Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update choose teams feature to exclude unavailable players

  • Loading branch information...
commit e1bf3864b9a1f956d243a6795b5e7fa7b4640569 1 parent c925fd6
@jamesshipton authored
View
5 features/choose_teams.feature
@@ -4,7 +4,7 @@ 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 |
@@ -12,13 +12,14 @@ Feature: Pick balanced 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
Please sign in to comment.
Something went wrong with that request. Please try again.