title: Why controller spec is fail?
body: <p>I write a spec for the controller action <code>create</code> and when I running test, shell show me an error</p>
  
  <pre><code>   expected #count to have changed by 1, but was changed by 0
  </code></pre>
  
  <p>there is spec</p>
  
  <pre><code>let(:valid_attributes) { FactoryGirl.attributes_for(:company) }
  
  describe 'with valid params' do
    it 'creates a new company' do
      expect { post :create, company: valid_attributes }.to change(Company, :count).by(1)
  </code></pre>
  
  <p>and there is factory</p>
  
  <pre><code>FactoryGirl.define do
  
    factory :company do
      title Faker::Company.name
      url Faker::Internet.domain_word
      image File.open(File.join(Rails.root, '/spec/fixtures/POEox311zoM.jpg'))
    end
  end
  </code></pre>
  
  <p>how fix? I don't know what did i do wrong</p>
  
  <p><strong><em>upd</em></strong></p>
  
  <pre><code>  def create
      @company = Company.new(company_params)
      if @company.save
        redirect_to root_path
      else
        redirect_to root_path
      end
    end
  </code></pre>