Skip to content

Instantly share code, notes, and snippets.

@cnocon
Created August 25, 2013 13:50
Show Gist options
  • Save cnocon/6333939 to your computer and use it in GitHub Desktop.
Save cnocon/6333939 to your computer and use it in GitHub Desktop.
RSpec Test for "Contact" content in contact.htm.erb view.
require 'spec_helper'
describe "Static pages" do
.
.
.
describe "Contact page" do
it "should have the content 'Contact'" do
visit '/static_pages/contact'
expect(page).to have_content('Contact')
end
it "should have the right title" do
visit '/static_pages/contact'
expect(page).to have_title("RecipeApp | Contact")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment