title: How to test text on rendered view?
body: <p>Here is my test:</p>
  
  <pre><code>require "rspec"
  
  describe HomeController do
    render_views
  
    it "should renders the home" do
      get :home
      response.should render_template("home")
      response.should include_text("Simulate Circuits Online")
    end
  
  end
  </code></pre>
  
  <p>but, I got:</p>
  
  <pre><code>1) HomeController should renders the home
       Failure/Error: response.should include_text("Some text to be test ..")
       NoMethodError:
         undefined method `include_text' for #&lt;RSpec::Core::ExampleGroup::Nested_1:0xd429a0c&gt;
       # ./spec/controllers/home_controller_spec.rb:9:in `block (2 levels) in &lt;top (required)&gt;'
       # (eval):6:in `block in fork'
       # (eval):6:in `fork'
       # (eval):6:in `fork'
  </code></pre>
  
  <p>So, what's the right way to test the text rendered?</p>
  
  <p><strong>EDIT</strong>
  If I try  <code>response.should have_content("My text ..")</code></p>
  
  <p>I get</p>
  
  <pre><code>1) HomeController should renders the home
       Failure/Error: response.should have_content("My text ..")
         expected there to be text "My text .." in "#"
       # ./spec/controllers/home_controller_spec.rb:9:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>