title: undefined method 'post' for Rspec
body: <p>I'm working through a tutorial on Cucumber and Rspec for RoR in the textbook Engineering Software as a Service, along with going through the archived course on edX.org. I've run into a problem trying to work with Rspec.  The index view has a form which posts to a controller method, with the sole field having the name :search_terms. In movies_controller.rb has this method:</p>
  
  <pre><code>class MoviesController &lt; ApplicationController
    ...
    def search_tmdb
      @movies = Movie.find_in_tmdb(params[:search_terms])
      flash[:notice] = "Movie '#{params[:search_terms]}' not found."
      redirect_to movies_path
    end
  end
  </code></pre>
  
  <p>In movies_controller_spec.rb is the following:</p>
  
  <pre><code>  require 'spec_helper'
  
    describe MoviesController do
      describe 'searching TMDb' do
        it 'should call the model method that performs TMDb search' do
          post :search_tmdb, {:search_terms =&gt; 'hardware'}
        end
        ...
      end
    end
  </code></pre>
  
  <p>Rspec gives me the following error:</p>
  
  <pre><code>NoMethodError:
         undefined method `post' for &lt;RSpec::Core::ExampleGroup::Nested_1::Nested_1:0xb36c92c&gt;
  </code></pre>
  
  <p>It's my understanding that 'post' is a method that Rspec is supposed to provide inside the 'it' block, to simulate the posting of a form. I've searched but haven't found anything on point. One suggestion I found suggested that a user correct model class inheritance, but I don't have models yet, and I've seen this code work, or at least provide a helpful error message, on a screencast, without a model being implemented. Any help would be very much appreciated.</p>
  
  <p>EDITED</p>
  
  <p>Here is my 'spec_helper' file</p>
  
  <pre><code>ENV["RAILS_ENV"] ||= 'test'
  
  require File.expand_path("../../config/environment", __FILE__)
  require 'rspec/rails'
  require 'rspec/autorun'
  
  Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
  
  RSpec.configure do |config|
  
    config.fixture_path = "#{::Rails.root}/spec/fixtures"
    config.use_transactional_fixtures = true
    config.infer_base_class_for_anonymous_controllers = false
  
    config.order = "random"
  </code></pre>
  
  <p>end</p>