title: ruby on rails 3 - undefined method `has_content?' for "HomePages":String
body: <p>i'm new to ruby and i just start my first project.
  when i'm trying to run my first test throught rspec i failed.</p>
  
  <p>this is my gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '3.2.12'
  gem 'bootstrap-sass', '2.3.0.1'
  gem 'bcrypt-ruby', '3.0.1'
  gem 'faker', '1.1.2'
  gem 'will_paginate', '3.0.4'
  gem 'bootstrap-will_paginate', '0.0.9'
  gem 'jquery-rails', '2.2.1'
  gem 'mysql2'
  #gem 'execjs'
  gem 'therubyracer', :platforms =&gt; :ruby
  
  # Dev and test gems
  group :development, :test do
    gem 'rspec-rails', '2.13.0'
    gem 'guard-rspec', '2.4.1'
    gem 'guard-spork', '1.4.2'
    gem 'spork', '0.9.2'
  end
  
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '3.2.6'
    gem 'coffee-rails', '3.2.2'
    gem 'uglifier', '1.3.0'
  end
  
  #only test gems
  group :test do
    gem 'capybara', '2.0.2'
    gem 'factory_girl_rails', '4.2.1'
    gem 'cucumber-rails', '1.3.0', :require =&gt; false
    gem 'database_cleaner', '0.9.1'
    # gem 'launchy', '2.1.0'
    # gem 'rb-fsevent', '0.9.1', :require =&gt; false
    # gem 'growl', '1.0.3'
  end
  
  group :production do
    gem 'pg', '0.12.2'
  end
  </code></pre>
  
  <p>and here is my home_pages_spec.rb</p>
  
  <pre><code>require 'spec_helper'
  
  describe "HomePages" do
    before { get 'home_page/home'}
    it { should have_content("Home")}
  end
  </code></pre>
  
  <p>when i run </p>
  
  <pre><code>bundle exec rspec spec/requests/home_pages_spec.rb
  </code></pre>
  
  <p>i get</p>
  
  <pre><code>Failures:
  
    1) HomePages 
       Failure/Error: it { should have_content("Home")}
       NoMethodError:
         undefined method `has_content?' for "HomePages":String
       # ./spec/requests/home_pages_spec.rb:5:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>please help me, i search a little and saw similar problem but not as quite.. plus they were kinda old and what used to be bug isnt now.</p>
  
  <p>plus if you can explain to me why i cant use the visit command (also undefined method `visit' for RSpec::Core::ExampleGroup::Nested_1...) and have to use the get command it will be great</p>