Skip to content

Instantly share code, notes, and snippets.

@jmaicher
Created November 16, 2010 16:32
Show Gist options
  • Save jmaicher/702025 to your computer and use it in GitHub Desktop.
Save jmaicher/702025 to your computer and use it in GitHub Desktop.
Working with cucumber tables, factory_girl and email_steps
Feature: Verify email address
In order to ensure communication to the User
As a Service Provider
I want the User to verify his email address
Scenario: Verify email address after sign up
Given I sign up as an user with:
| email | johndoe@example.com |
Then "johndoe@example.com" should receive 1 email
When I open the email
And I click the first link in the email
Then I should see a confirmation message
Given /^I sign up as an user with:$/ do |table|
@user = Factory.build(:user, table.rows_hash)
When "I go to the sign up page"
And "I fill in \"Name\" with \"#{@user.name}\""
And "I fill in \"Username\" with \"#{@user.username}\""
And "I fill in \"E-mail\" with \"#{@user.email}\""
And "I fill in \"Password\" with \"#{@user.password}\""
And "I fill in \"Password confirmation\" with \"#{@user.password}\""
And "I press \"Sign up\""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment