title: Getting an ActionController::UnknownFormat, rspec testing when creating new object
body: <p>Recently moved to Rails 4 and getting errors that I wasn't getting before. 
  I'm trying to test a form that I'm making using Capybara/Rspec. </p>
  
  <p>When I click the button on the form, the error I get is:</p>
  
  <pre><code>Failure/Error: find(".submit.button").click
       ActionController::UnknownFormat:
         ActionController::UnknownFormat
       # ./app/controllers/office_listings_controller.rb:32:in `create'
       # ./spec/features/office_listings_spec.rb:78:in `block (3 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>It points to my controller which looks like:</p>
  
  <pre><code>def create
      selected_amenities = params[:amenities] || [] # empty list if no amenities checked
      @office_listing = OfficeListing.new(params[:office_listing])
      @office_listing.broker = current_broker
      p current_broker
      @office_listing.neighborhood = Neighborhood.find(params[:neighborhood_id])
      p @office_listing.neighborhood
      if @office_listing &amp;&amp; @office_listing.save!
        @path = city_neighborhood_office_listing_path(@office_listing, :city_id =&gt; @office_listing.neighborhood.city.id, :neighborhood_id =&gt; @office_listing.neighborhood.id)
        create_amenities(@office_listing, selected_amenities)
        respond_to do |format|
          format.js
        end
      else
        @failure = "Unable to create office :-("
        respond_to do |format|
          format.js
        end
      end
    end
  </code></pre>
  
  <p>and it doesn't like the format.js line 
  even though I have a create.js.erb file which is being rendered when I actually run the page. </p>
  
  <p>Don't understand why the actual page is running but my test is failing.</p>
  
  <p>Any thoughts would be greatly appreciated!!</p>