Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##Account.feature
- Feature: Authentication
- In order to validate zombies
- I want to use my account on the website.
- Background:
- Given the following zombie records
- | name | email | password |
- | Jakub Rรกฤek | jakub@hotmail.com | jakub |
- | Denis Homola | denis@hotmail.com | denis |
- Scenario: i should be able to login with valid credentials
- Given I am on signin page
- When I fill in "Email" with "jakub@hotmail.com"
- And I fill in "Password" with "jakub"
- And I press "Sign in"
- Then I should see "Signed in successfully"
- ##common_steps.rb
- Given /^the following (.+) records$/ do |factory, table|
- table.hashes.each do |hash|
- Factory(factory, hash)
- end
- end
- ##spec/factories/zombie.rb
- Factory.define :zombie do |f|
- f.sequence(:name) { |n| "name#{n}" }
- f.password "secret"
- f.password_confirmation { |u| u.password }
- f.sequence(:email) { |n| "email#{n}@hotmail.com"}
- end
- ## Then I run cucumber and I got Error
- No such factory: zombie (ArgumentError)
Add Comment
Please, Sign In to add comment