Created
November 16, 2010 16:32
-
-
Save jmaicher/702025 to your computer and use it in GitHub Desktop.
Working with cucumber tables, factory_girl and email_steps
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: 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 | [email protected] | | |
Then "[email protected]" 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 |
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
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