title: Nokogiri with Rspec
body: <p>Is there a way to use Nokogiri in Rspec?</p>
  
  <p>Particularly I'm trying to take the response from a controller action and convert that into a Nokogiri object <code>page</code> and run Nokogiri-specific parsing like the one below:</p>
  
  <pre><code>page.search('input[name="some_name"]').size.should == 1
  </code></pre>
  
  <p>Where do I include Nokogiri - would that be in spec_helper.rb? </p>
  
  <p>How do I convert the <code>ActionController::TestResponse</code> into a Nokogiri object?</p>
  
  <p>Or is it possible to run the above kind of assertion by using plain Rspec syntax?</p>