organize spec comments

This commit is contained in:
Jesse C. Fisher 2015-08-04 19:01:02 -07:00
parent 38fcfcd4e5
commit 012cefc558

View File

@ -12,6 +12,10 @@ feature 'Play a hand', type: :feature do
# When I play a hand containing the lowest card # When I play a hand containing the lowest card
# Then I see a successful play message # Then I see a successful play message
scenario 'first play contains lowest card' do scenario 'first play contains lowest card' do
# create game with players
# current_player plays hand containing lowest card
# expect successful play message
# TODO: extract game setup to a factory # TODO: extract game setup to a factory
game = FactoryGirl.create :game game = FactoryGirl.create :game
user1 = FactoryGirl.create :user user1 = FactoryGirl.create :user
@ -26,12 +30,11 @@ feature 'Play a hand', type: :feature do
check @card_to_play.to_s check @card_to_play.to_s
click_button 'Play Hand' click_button 'Play Hand'
expect(page).to have_content('Played ' + game.lowest_card.to_s) expect(page).to have_content('Played ' + game.lowest_card.to_s)
# create game with players
# current_player plays hand containing lowest card
# expect successful play message
end end
scenario 'first play does not contain lowest card' do scenario 'first play does not contain lowest card' do
# current_player plays hand not containing lowest card
# expect unsuccessful play message hand MUST contain lowest card
game = FactoryGirl.create :game game = FactoryGirl.create :game
user1 = FactoryGirl.create :user user1 = FactoryGirl.create :user
user2 = FactoryGirl.create :user user2 = FactoryGirl.create :user
@ -46,8 +49,6 @@ feature 'Play a hand', type: :feature do
click_button 'Play Hand' click_button 'Play Hand'
expect(page).to have_content expect(page).to have_content
"First hand must contain the lowest card: #{game.lowest_card.to_s}" "First hand must contain the lowest card: #{game.lowest_card.to_s}"
# current_player plays hand not containing lowest card
# expect unsuccessful play message hand MUST contain lowest card
end end
# Scenario: Player can play a valid hand on their turn # Scenario: Player can play a valid hand on their turn