title: ActionController::UnknownFormat in controller rspec after rails 4 upgrade
body: <p>I have been stuck on this issue for a day. This is how the controller looks like:</p>
  
  <pre><code>class HarvestSchedulesController &lt; ApplicationController
  
    before_filter :authenticate_user!
  
    respond_to :json
  
    def show
      @harvest_schedule = HarvestSchedule.find(params[:id])
      respond_with @harvest_schedule
    end    
  end
  </code></pre>
  
  <p>and the spec:</p>
  
  <pre><code>let(:schedule) { mock_model(HarvestSchedule).as_null_object }
  
  describe "GET show" do
     before(:each) do
       HarvestSchedule.stub(:find).with("1") { schedule }
     end
  
     it "finds the harvest schedule" do
       HarvestSchedule.should_receive(:find).with("1") { schedule }
       get :show, id: 1
       assigns(:harvest_schedule).should eq schedule
     end
  end
  </code></pre>
  
  <p>When I run the spec, the error is:</p>
  
  <pre><code>Failure/Error: HarvestSchedule.should_receive(:find).with("1") { schedule }
  ActionController::UnknownFormat:
    ActionController::UnknownFormat
  # ./app/controllers/harvest_schedules_controller.rb:29:in `show'
  # ./spec/controllers/harvest_schedules_controller_spec.rb:41:in `block (3 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>I cannot see any problem in the controller or spec at all. The app was using Rails 3.2.12 before and all the specs passed. This error only occurs after I upgraded Rails version to 4.1.4. I am using rspec 2.14.1. Did anyone encounter similar problem?</p>
  
  <p>Cheers</p>