Created
December 11, 2008 21:42
-
-
Save agibralter/34885 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: a user signing up # features/users/signup.feature | |
As a user | |
I want a smooth sign up process | |
So ... | |
Scenario: the user sees the form # features/users/signup.feature:7 | |
When the visitor goes to '/signup' # features/steps/general_steps.rb:49 | |
Then the visitor should see the signup form # features/steps/users/signup_steps.rb:1 | |
Scenario: a successful signup # features/users/signup.feature:11 | |
When the user goes to '/signup' # features/steps/general_steps.rb:49 | |
And he fills in 'user_email' with 'bob@fat.com' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password' with 'password' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password_confirmation' with 'password' # features/steps/general_steps.rb:29 | |
And he checks 'user_terms_and_conditions' # features/steps/general_steps.rb:37 | |
And he presses 'join the project' # features/steps/general_steps.rb:21 | |
Then there should be a user 'bob@fat.com' # features/steps/user_steps.rb:11 | |
And the user 'bob@fat.com' should be in state_email 'unverified' # features/steps/user_steps.rb:15 | |
And an email should have been sent to 'bob@fat.com' # vendor/plugins/email-spec/lib/email_spec_steps.rb:35 | |
And 'bob@fat.com' should be logged in # features/steps/users/login_steps.rb:9 | |
Scenario Outline: errors with input # features/users/signup.feature:23 | |
When the user goes to '/signup' # features/users/signup.feature:24 | |
And he fills in 'user_email' with '<email>' # features/users/signup.feature:25 | |
And he fills in 'user_password' with '<password>' # features/users/signup.feature:26 | |
And he fills in 'user_password_confirmation' with '<password_confirmation>' # features/users/signup.feature:27 | |
And he checks 'user_terms_and_conditions' # features/users/signup.feature:28 | |
And he presses 'join the project' # features/users/signup.feature:29 | |
Then the user should see '<message>' # features/users/signup.feature:30 | |
And an email should not have been sent to 'bob@fat.com' # features/users/signup.feature:31 | |
|email |password|password_confirmation|message | | |
|bob |password|password |email must be at least 5 characters long| | |
|bob@fat.com|password|password_bad |passwords do not match | | |
Scenario: already taken email # features/users/signup.feature:38 | |
Given the following users exist: # features/steps/user_steps.rb:1 | |
And a clear email queue # vendor/plugins/email-spec/lib/email_spec_steps.rb:1 | |
When another user goes to '/signup' # features/steps/general_steps.rb:49 | |
And he fills in 'user_email' with 'bob@fat.com' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password' with 'password' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password_confirmation' with 'password' # features/steps/general_steps.rb:29 | |
And he checks 'user_terms_and_conditions' # features/steps/general_steps.rb:37 | |
And he presses 'join the project' # features/steps/general_steps.rb:21 | |
Then the user should see 'email is taken; please contact us if this seems like a mistake' # features/steps/general_steps.rb:57 | |
And an email should not have been sent to 'bob@fat.com' # vendor/plugins/email-spec/lib/email_spec_steps.rb:39 | |
Scenario: doesn't agree to t&c # features/users/signup.feature:52 | |
When the user goes to '/signup' # features/steps/general_steps.rb:49 | |
And he fills in 'user_email' with 'bob@fat.com' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password' with 'password' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password_confirmation' with 'password' # features/steps/general_steps.rb:29 | |
And he presses 'join the project' # features/steps/general_steps.rb:21 | |
Then the user should see 'please read and agree to the terms and conditions' # features/steps/general_steps.rb:57 | |
And an email should not have been sent to 'bob@fat.com' # vendor/plugins/email-spec/lib/email_spec_steps.rb:39 | |
Scenario: a user is passively 'opted-in' to Urtak News # features/users/signup.feature:61 | |
When the user goes to '/signup' # features/steps/general_steps.rb:49 | |
And he fills in 'user_email' with 'bob@fat.com' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password' with 'password' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password_confirmation' with 'password' # features/steps/general_steps.rb:29 | |
And he checks 'user_terms_and_conditions' # features/steps/general_steps.rb:37 | |
And he presses 'join the project' # features/steps/general_steps.rb:21 | |
Then there should be a user 'bob@fat.com' # features/steps/user_steps.rb:11 | |
And an email should have been sent to 'bob@fat.com' # vendor/plugins/email-spec/lib/email_spec_steps.rb:35 | |
And the user 'bob@fat.com' should be in state_news 'subscribed' # features/steps/user_steps.rb:15 | |
Scenario: a user un-checks Urtak News # features/users/signup.feature:72 | |
When the user goes to '/signup' # features/steps/general_steps.rb:49 | |
And he fills in 'user_email' with 'bob@fat.com' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password' with 'password' # features/steps/general_steps.rb:29 | |
And he fills in 'user_password_confirmation' with 'password' # features/steps/general_steps.rb:29 | |
And he checks 'user_terms_and_conditions' # features/steps/general_steps.rb:37 | |
And he unchecks 'user_news' # features/steps/general_steps.rb:37 | |
And he presses 'join the project' # features/steps/general_steps.rb:21 | |
Then there should be a user 'bob@fat.com' # features/steps/user_steps.rb:11 | |
And an email should have been sent to 'bob@fat.com' # vendor/plugins/email-spec/lib/email_spec_steps.rb:35 | |
And the user 'bob@fat.com' should be in state_news 'demetri' # features/steps/user_steps.rb:15 | |
Scenario Outline: a user fills out year and gender # features/users/signup.feature:84 | |
When the user goes to '/signup' # features/users/signup.feature:85 | |
And he fills in 'user_email' with 'bob@fat.com' # features/users/signup.feature:86 | |
And he fills in 'user_password' with 'password' # features/users/signup.feature:87 | |
And he fills in 'user_password_confirmation' with 'password' # features/users/signup.feature:88 | |
And he checks 'user_terms_and_conditions' # features/users/signup.feature:89 | |
And selects '<gender>' # features/users/signup.feature:90 | |
And selects '<year>' # features/users/signup.feature:91 | |
And he presses 'join the project' # features/users/signup.feature:92 | |
Then there should be a user with email 'bob@fat.com' # features/users/signup.feature:93 | |
And the user 'bob@fat.com' should have a profile with gender '<year>' # features/users/signup.feature:94 | |
And the user 'bob@fat.com' should have a profile with year '<year>' # features/users/signup.feature:95 | |
|gender|year| | |
|m |1985| | |
|f |1980| | |
80 steps passed | |
6 steps pending (6 with no step definition) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: a user signing up for urtak | |
As a user | |
I want a smooth sign up process | |
So that I have less in between me and urtak | |
Scenario: the user sees the form | |
When the visitor goes to '/signup' | |
Then the visitor should see the signup form | |
Scenario: a successful signup | |
When the user goes to '/signup' | |
And he fills in 'user_email' with 'bob@fat.com' | |
And he fills in 'user_password' with 'password' | |
And he fills in 'user_password_confirmation' with 'password' | |
And he checks 'user_terms_and_conditions' | |
And he presses 'join the urtak project' | |
Then there should be a user 'bob@fat.com' | |
And the user 'bob@fat.com' should be in state_email 'unverified' | |
And an email should have been sent to 'bob@fat.com' | |
And 'bob@fat.com' should be logged in | |
Scenario Outline: errors with input | |
When the user goes to '/signup' | |
And he fills in 'user_email' with '<email>' | |
And he fills in 'user_password' with '<password>' | |
And he fills in 'user_password_confirmation' with '<password_confirmation>' | |
And he checks 'user_terms_and_conditions' | |
And he presses 'join the urtak project' | |
Then the user should see '<message>' | |
And an email should not have been sent to 'bob@fat.com' | |
Examples: | |
| email | password | password_confirmation | message | | |
| bob | password | password | email must be at least 5 characters long | | |
| bob@fat.com | password | password_bad | passwords do not match | | |
Scenario: already taken email | |
Given the following users exist: | |
| email | password | | |
| bob@fat.com | bilgepump | | |
And a clear email queue | |
When another user goes to '/signup' | |
And he fills in 'user_email' with 'bob@fat.com' | |
And he fills in 'user_password' with 'password' | |
And he fills in 'user_password_confirmation' with 'password' | |
And he checks 'user_terms_and_conditions' | |
And he presses 'join the urtak project' | |
Then the user should see 'email is taken; please contact us if this seems like a mistake' | |
And an email should not have been sent to 'bob@fat.com' | |
Scenario: doesn't agree to t&c | |
When the user goes to '/signup' | |
And he fills in 'user_email' with 'bob@fat.com' | |
And he fills in 'user_password' with 'password' | |
And he fills in 'user_password_confirmation' with 'password' | |
And he presses 'join the urtak project' | |
Then the user should see 'please read and agree to the terms and conditions' | |
And an email should not have been sent to 'bob@fat.com' | |
Scenario: a user is passively 'opted-in' to Urtak News | |
When the user goes to '/signup' | |
And he fills in 'user_email' with 'bob@fat.com' | |
And he fills in 'user_password' with 'password' | |
And he fills in 'user_password_confirmation' with 'password' | |
And he checks 'user_terms_and_conditions' | |
And he presses 'join the urtak project' | |
Then there should be a user 'bob@fat.com' | |
And an email should have been sent to 'bob@fat.com' | |
And the user 'bob@fat.com' should be in state_news 'subscribed' | |
Scenario: a user un-checks Urtak News | |
When the user goes to '/signup' | |
And he fills in 'user_email' with 'bob@fat.com' | |
And he fills in 'user_password' with 'password' | |
And he fills in 'user_password_confirmation' with 'password' | |
And he checks 'user_terms_and_conditions' | |
And he unchecks 'user_urtak_news' | |
And he presses 'join the urtak project' | |
Then there should be a user 'bob@fat.com' | |
And an email should have been sent to 'bob@fat.com' | |
And the user 'bob@fat.com' should be in state_news 'demetri' | |
Scenario Outline: a user fills out year and gender | |
When the user goes to '/signup' | |
And he fills in 'user_email' with 'bob@fat.com' | |
And he fills in 'user_password' with 'password' | |
And he fills in 'user_password_confirmation' with 'password' | |
And he checks 'user_terms_and_conditions' | |
And selects '<gender>' | |
And selects '<year>' | |
And he presses 'join the urtak project' | |
Then there should be a user with email 'bob@fat.com' | |
And the user 'bob@fat.com' should have a profile with gender '<year>' | |
And the user 'bob@fat.com' should have a profile with year '<year>' | |
Examples: | |
| gender | year | | |
| m | 1985 | | |
| f | 1980 | | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment