Skip to content

Instantly share code, notes, and snippets.

@markbates
Created March 4, 2011 15:30
Show Gist options
  • Save markbates/854764 to your computer and use it in GitHub Desktop.
Save markbates/854764 to your computer and use it in GitHub Desktop.
Cucumber Story
Feature: Registration
In order to use My Great Application
As a user
I want to be able to register
Scenario: 'Standard Registration'
Given I am not currently logged in
When I am on the signup page
Then I should see "Sign Up"
And I fill in "Name (required)" with "Mickey Dolenz"
And I fill in "Email (required)" with "mickey@monkees.com"
And I fill in "Password (required)" with "password"
And I fill in "Password confirmation" with "password"
And I press "Register"
Then I should see "Sign Up - Confirm Your Account"
Then I should be on the registration thank you page
Then "mickey@monkees.com" should receive an email
When I open the email
Then I should see "Confirm my account" in the email body
When I follow "Confirm my account" in the email
Then I should be on the welcome page
And I should see "Welcome to the Great Application"
Scenario: 'Accepting an invitation'
Given I am not currently logged in
And the "Boys and Girls Club" invites "mickey@monkees.com" to join
Then "mickey@monkees.com" should receive an email
When I open the email
Then I should see "Accept Invitation" in the email body
When I follow "Accept Invitation" in the email
Then I should be on the signup page
Then I should see "Sign Up"
And I fill in "Name (required)" with "Mickey Dolenz"
And the "Email (required)" field should contain "mickey@monkees.com"
And I fill in "Password (required)" with "password"
And I fill in "Password confirmation" with "password"
And I press "Register"
Then the account "mickey@monkees.com" should be "activated"
Then I should be on the accept/decline invitation page
And I should see "Join the Boys and Girls Club"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment