title: Undefined Webrat methods in Cucumber
body: <p>When I set up a new rails 3.1.3 project and write a Cucumber story with Webrat code, like this:</p>
  
  <pre><code>response.should contain("abc")
  </code></pre>
  
  <p>and I run <code>rake cucumber</code>, I get:</p>
  
  <pre><code>undefined method `contain' for #&lt;Cucumber::Rails::World:0x00000003d2c578&gt; (NoMethodError)
  </code></pre>
  
  <p>I believe that either Cucumber or Webrat or Rails is broken because I did nothing special at all and stuck to documentation.</p>
  
  <p>The following steps reproduce the error:</p>
  
  <ul>
  <li><code>rvm 1.9.2</code></li>
  <li><code>rails new testapp -d mysql</code></li>
  <li><code>cd testapp</code></li>
  <li>{{ Edit database.yml }}</li>
  <li><code>rake db:create</code></li>
  <li><code>rake db:migrate</code></li>
  <li><code>gem install cucumber-rails</code></li>
  <li><code>gem install webrat</code></li>
  <li><code>gem install database_cleaner</code></li>
  <li>{{ Edit Gemfile to include 'cucumber-rails', 'webrat' and 'database_cleaner' without version numbers }}</li>
  <li><code>bundle install</code></li>
  <li><code>rails g cucumber:install</code></li>
  <li><code>rails g controller genres index</code></li>
  <li>add "resources :genres" to routes.rb</li>
  <li>{{ rails s and <a href="http://localhost:3000/genres" rel="nofollow noreferrer">http://localhost:3000/genres</a> works now }}</li>
  <li>Create /features/create_movie.feature with contents:</li>
  </ul>
  
  <p><code>
      Feature: Create movie</p>
  
  <pre><code>Description
  
    Scenario: Create a movie in genre
      Given a genre named Comedy
      When I create a movie Caddyshack in the Comedy genre
      Then Caddyshack should be in the Comedy genre
  </code></pre>
  
  <p></code></p>
  
  <ul>
  <li>Create /features/step_definitions/movie_steps.rb with contents:</li>
  </ul>
  
  <p><code>
      Given /^a genre named Comedy$/ do
      end</p>
  
  <pre><code>When /^I create a movie Caddyshack in the Comedy genre$/ do
  end
  
  Then /^Caddyshack should be in the Comedy genre$/ do
    visit genres_path
    response.should contain("abc")
  end
  </code></pre>
  
  <p></code></p>
  
  <ul>
  <li><code>rake cucumber</code></li>
  <li>It fails with the error quoted above.</li>
  <li>Various suggestions in the internet did NOT work (e.g. <a href="https://stackoverflow.com/questions/3546011/undefined-webrat-methods-in-cucumber-step-definitions">Undefined webrat methods in cucumber step_definitions</a>)</li>
  <li>My versions:</li>
  </ul>
  
  <p>rails 3.1.3<br>
  cucumber 1.1.4<br>
  cucumber-rails 1.2.1<br>
  webrat 0.7.3<br>
  rack 1.3.5<br>
  rake 0.9.2.2</p>
  
  <p>Any hints about how to resolve this?</p>