Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Feature
- Feature: View user # features/view_user.feature
- In order to see details about a user
- A user
- Should be able to view an existing user
- Scenario: User exists # features/view_user.feature:6
- Given a user exists with an email of "moses@example.com" # features/step_definitions/factory_girl_steps.rb:2
- When I go to the "moses@example.com" user profile page # features/step_definitions/webrat_steps.rb:6
- Then I should see "moses@example.com" # features/step_definitions/webrat_steps.rb:89
- Scenario: User does not exist # features/view_user.feature:11
- Given no user exists with an email of "moses@example.com" # features/step_definitions/clearance_steps.rb:9
- When I go to the "moses@example.com" user profile page # features/step_definitions/webrat_steps.rb:6
- Couldn't find User with ID=1 (ActiveRecord::RecordNotFound)
- /Users/dancroak/dev/clearance_suspenders/vendor/plugins/squirrel/lib/squirrel.rb:16:in `find'
- /Users/dancroak/dev/clearance_suspenders/app/controllers/users_controller.rb:5:in `show'
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
- /Library/Ruby/Gems/1.8/gems/aslakhellesoy-webrat-0.3.2.2/lib/webrat/rails.rb:53:in `send'
- /Library/Ruby/Gems/1.8/gems/aslakhellesoy-webrat-0.3.2.2/lib/webrat/rails.rb:53:in `do_request'
- /Library/Ruby/Gems/1.8/gems/aslakhellesoy-webrat-0.3.2.2/lib/webrat/rails.rb:18:in `get'
- /Library/Ruby/Gems/1.8/gems/aslakhellesoy-webrat-0.3.2.2/lib/webrat/core/session.rb:98:in `send'
- /Library/Ruby/Gems/1.8/gems/aslakhellesoy-webrat-0.3.2.2/lib/webrat/core/session.rb:98:in `request_page'
- /Library/Ruby/Gems/1.8/gems/aslakhellesoy-webrat-0.3.2.2/lib/webrat/core/session.rb:171:in `visit'
- (eval):2:in `visit'
- ./features/step_definitions/webrat_steps.rb:7:in `When /^I go to (.+)$/'
- features/view_user.feature:13:in `When I go to the "moses@example.com" user profile page'
- Then I should see "not found" # features/step_definitions/webrat_steps.rb:89
- 17 scenarios
- 82 steps passed
- 2 steps failed
- 2 steps skipped
- # Steps
- Factory.factories.each do |name, factory|
- Given /^an? #{name} exists with an? (.*) of "([^"]*)"$/ do |attr, value|
- Factory(name, attr.gsub(' ', '_') => value)
- end
- end
- Given /^no user exists with an email of "(.*)"$/ do |email|
- assert_nil User.find_by_email(email)
- end
- # Paths
- when /the "(.*)" user profile page/i
- user_path (User.find_by_email($1) || 1)
Add Comment
Please, Sign In to add comment