Permalink
Browse files

Update choose teams feature to exclude unavailable players

  • Loading branch information...
1 parent c925fd6 commit e1bf3864b9a1f956d243a6795b5e7fa7b4640569 @jamesshipton committed Apr 1, 2012
Showing with 4 additions and 3 deletions.
  1. +3 −2 features/choose_teams.feature
  2. +1 −1 features/step-definitions/choose_teams_steps.rb
View
5 features/choose_teams.feature
@@ -4,21 +4,22 @@ Feature: Pick balanced teams
I want to pick balanced teams from the list of available players
Scenario: 2 players are available
- Given the following available players
+ Given the following players
| name | skill |
| player 1 | 5 |
| player 2 | 5 |
When I pick the teams
Then each team should have 1 player and 5 points
Scenario: 5 players are available
- Given the following available players
+ Given the following players
| name | skill |
| player 1 | 5 |
| player 2 | 5 |
| player 3 | 1 |
| player 4 | 1 |
| player 5 | 3 |
+ | #player 6 | 3 |
When I pick the teams
Then one team should have 3 players and 7 points
View
2 features/step-definitions/choose_teams_steps.rb
@@ -1,4 +1,4 @@
-Given 'the following available players' do |players|
+Given 'the following players' do |players|
player_content = players.hashes.inject('') do |total_content, player|
total_content << "#{player['name']},#{player['skill']}\n"
end

0 comments on commit e1bf386

Please sign in to comment.