Skip to content

Instantly share code, notes, and snippets.

@oliverbarnes
Created April 5, 2011 22:48
Show Gist options
  • Select an option

  • Save oliverbarnes/904743 to your computer and use it in GitHub Desktop.

Select an option

Save oliverbarnes/904743 to your computer and use it in GitHub Desktop.
Rspec request spec example
#From rspec-rails readme on github
describe "widgets resource" do
describe "GET index" do
it "contains the widgets header" do
get "/widgets/index"
response.should have_selector("h1", :content => "Widgets")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment