Guest User

Untitled

a guest
Mar 15th, 2018
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. ## Scenario
  2.  
  3. Scenario: Show next X in the module
  4.  
  5. Given a member named Nolan
  6. And a group named Lefties
  7. And Nolan schedules an event for Lefties every day for the next 10 days
  8. When Nolan visits the group page for the group Lefties
  9. Then he should only see the events for the next 5 days
  10.  
  11. ## Step matcher
  12.  
  13. Given "$user schedules an event for $group every day for the next 10 days" do |user, group|
  14. 10.times do |i|
  15. puts "#{@lefties.inspect}"
  16. puts "#{@nolan.inspect}"
  17. Event.create!(:start_date => i.days.from_now, :title => "event_#{i}", :group => @lefties, :creator => @nolan)
  18. end
  19. end
  20.  
  21. ## Output
  22.  
  23. Scenario: Show next X in the module
  24.  
  25. Given a member named Nolan
  26. 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>
  27. #<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>
  28.  
  29. And Nolan schedules an event for Lefties every day for the next 10 days (FAILED)
  30.  
  31. When Nolan visits the group page for the group Lefties
  32.  
  33. Then he should only see the events for the next 5 days (SKIPPED)
  34.  
  35. Scenario: TODO - Don't allow unapproved U13s to edit schedule
  36.  
  37. Scenario: TODO - Time zone tracking
  38.  
  39. 7 scenarios: 6 succeeded, 1 failed, 0 pending
  40.  
  41. FAILURES:
  42. 1) Create an event (Show next X in the module) FAILED
  43. ActiveRecord::RecordInvalid: Validation failed: Creator can't be blank, Group can't be blank
  44. /Users/noah/Projects/weplay/repos/stories/steps/schedules.rb:15:in `$user schedules an event for $group every day for the next 10 days'
  45. /Users/noah/Projects/weplay/repos/stories/steps/schedules.rb:12:in `times'
  46. /Users/noah/Projects/weplay/repos/stories/steps/schedules.rb:12:in `$user schedules an event for $group every day for the next 10 days'
  47. ./script/story:71
Add Comment
Please, Sign In to add comment