From 902685ea516b8fd57688afe7e29dc39eb1f258bb Mon Sep 17 00:00:00 2001 From: RJ Osborne Date: Wed, 27 May 2015 22:14:19 -0400 Subject: [PATCH] Get us back to green on the tests. upcomingMatches doesn't (and shouldn't) change tournament state. --- test/integration/poolbracket_matchups_test.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/integration/poolbracket_matchups_test.rb b/test/integration/poolbracket_matchups_test.rb index b2a6c3f..1d0e682 100644 --- a/test/integration/poolbracket_matchups_test.rb +++ b/test/integration/poolbracket_matchups_test.rb @@ -59,7 +59,7 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest end def checkForByeInPool(tournament) - tournament.upcomingMatches + tournament.generateMatchups matchups = tournament.matches tournament.weights.each do |w| w.wrestlers.each do |wr| @@ -126,11 +126,9 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest test "test if a wrestler can exceed five matches" do - @count = 5 - until @count > 16 do - @tournament2 = createTournament(@count) - checkForByeInPool(@tournament2) - @count = @count + 1 + (5...16).each do |count| + tourney = createTournament(count) + checkForByeInPool(tourney) end end