Skip to content

Instantly share code, notes, and snippets.

@MarkMenard
Created March 6, 2009 21:41
Show Gist options
  • Save MarkMenard/75085 to your computer and use it in GitHub Desktop.
Save MarkMenard/75085 to your computer and use it in GitHub Desktop.
Feature: Login # features/login.feature
In order to secure access to the application.
I want all users to have to login.
Scenario: Present login page to unauthenticated users. # features/login.feature:5
Given I have an account for "test" # features/step_definitions/global_steps.rb:3
And I go to "account root" # features/step_definitions/webrat_steps.rb:6
Then I should see "Login" # features/step_definitions/webrat_steps.rb:94
expected: /Login/m,
got: "<html><body>You are being <a href=\"http://test.localhost/session/new\">redirected</a>.</body></html>" (using =~)
Diff:
@@ -1,2 +1,2 @@
-/Login/m
+"<html><body>You are being <a href=\"http://test.localhost/session/new\">redirected</a>.</body></html>" (Spec::Expectations::ExpectationNotMetError)
./features/step_definitions/webrat_steps.rb:95:in `Then /^I should see "(.*)"$/'
features/login.feature:8:in `Then I should see "Login"'
And I should see "Password" # features/step_definitions/webrat_steps.rb:94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment