Skip to content

Instantly share code, notes, and snippets.

@nathanjsharpe
Created November 14, 2012 22:36
Show Gist options
  • Save nathanjsharpe/4075345 to your computer and use it in GitHub Desktop.
Save nathanjsharpe/4075345 to your computer and use it in GitHub Desktop.
Rspec problem
describe 'on signup page' do
before { visit '/signup' }
let(:submit) { "Create Account" }
context "with invalid information" do
# tests here work great
end
context 'with valid information' do
before do
# Fill in form
end
describe "confirmation page" do
before do
click_on submit
end
it "displays flash message for account creation" do
page.should have_content('Your online account has been created.')
end
# Other tests for confirmation page
describe "welcome page" do
before do
click_on "Confirm Purchase"
end
it "shows flash message welcoming user" do
page.should have_content('Welcome')
end
# Other tests for welcome page
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment