Skip to content

Instantly share code, notes, and snippets.

@thesp0nge
Created May 12, 2011 14:51
Show Gist options
  • Save thesp0nge/968656 to your computer and use it in GitHub Desktop.
Save thesp0nge/968656 to your computer and use it in GitHub Desktop.
welcome_spec.rb
require 'spec_helper'
context "A user reach the welcome page" do
it "must find a 'Register Now' button" do
visit root_path
page.should have_link('Register Now')
end
it "must be redirected to user registration when clicking the 'Register Now' link" do
visit root_path
click_link 'Register Now'
page.current_url.should include(new_user_path)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment