title: Reusing RSpec tests in other tests
body: <p>I'm very rigorous when it comes to my HTML markup and I follow a strict coding convention for forms, lists, etc...</p>
  
  <p>I would like to include reusable test in my RSpec tests that would allow for me call a form test from any other test and target it directly to the page or URL that I'm testing.</p>
  
  <p>Something like this:</p>
  
  <pre><code># spec/helpers/form_tester.rb
  describe FormTester
    it "should check to see if all the text fields have an ID prefix of 'input-'" do
      ... @form should be valid ...
      should be true
    end
  end
  
  # spec/requests/user_form.rb
  describe UserForm
    it "should validate the form" do
      @form = find(:tag,'form')
      # call the FormTester method        
    end
  end
  </code></pre>
  
  <p>Any ideas on how todo this? I'm using Rails 3.1, with RSpec, Capybara and FactoryGirl.</p>