Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Scenario
- Scenario: Show next X in the module
- Given a member named Nolan
- And a group named Lefties
- And Nolan schedules an event for Lefties every day for the next 10 days
- When Nolan visits the group page for the group Lefties
- Then he should only see the events for the next 5 days
- ## Step matcher
- Given "$user schedules an event for $group every day for the next 10 days" do |user, group|
- 10.times do |i|
- puts "#{@lefties.inspect}"
- puts "#{@nolan.inspect}"
- Event.create!(:start_date => i.days.from_now, :title => "event_#{i}", :group => @lefties, :creator => @nolan)
- end
- end
- ## Output
- Scenario: Show next X in the module
- Given a member named Nolan
- And a group named Lefties#<Adult id: 219, username: "nolan", secured_password: "7c1b46ab0fe41ea32baabed3b7c8c1bc4a27621b0e86c232e61...", created_at: "2008-05-13 23:45:03", receive_newsletter: nil, first_name: "Nolan", last_name: "Shaw", email: "nolan@example.com", created_from_ip: nil, email_verified: true, type: "Adult", dob: "1973-11-02", adult_id: nil, state: "unconfirmed", comments_count: 0, commentable: true, last_action_at: nil, zip: "12354", friends_count: 0, receive_friend_notification: true, sport_id: nil, salt: "fd6b7e196f54bfef16ed3450906448f1188f3d92", gender: "Male", hide_online_status: false, age_verified: false, total_points: 0, updated_at: "2008-05-13 23:45:03", signup_role: nil, invitations_sent_count: 0, kshow_id: nil, admin: false, super_admin: false, pro_athlete: false, suspect: false, suspect_comment: nil>
- #<Team id: 110, name: "Lefties", location: nil, type: "Team", user_id: nil, created_at: "2008-05-13 23:45:03", updated_at: "2008-05-13 23:45:03", sport_id: 1, creator_id: 220, commentable: true, comments_count: 0, zip: "12354", privacy: 1, description: nil, event_creation_level: 1, official_designation: nil, primary_color: nil, secondary_color: nil, text_color_mode: nil, feed_id: nil, rss_module_title: nil>
- And Nolan schedules an event for Lefties every day for the next 10 days (FAILED)
- When Nolan visits the group page for the group Lefties
- Then he should only see the events for the next 5 days (SKIPPED)
- Scenario: TODO - Don't allow unapproved U13s to edit schedule
- Scenario: TODO - Time zone tracking
- 7 scenarios: 6 succeeded, 1 failed, 0 pending
- FAILURES:
- 1) Create an event (Show next X in the module) FAILED
- ActiveRecord::RecordInvalid: Validation failed: Creator can't be blank, Group can't be blank
- /Users/noah/Projects/weplay/repos/stories/steps/schedules.rb:15:in `$user schedules an event for $group every day for the next 10 days'
- /Users/noah/Projects/weplay/repos/stories/steps/schedules.rb:12:in `times'
- /Users/noah/Projects/weplay/repos/stories/steps/schedules.rb:12:in `$user schedules an event for $group every day for the next 10 days'
- ./script/story:71
Add Comment
Please, Sign In to add comment