From 7c480be5a9125cbf5d3feaa2a8993b10fec2f61f Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Thu, 19 May 2011 12:30:00 -0400 Subject: [PATCH] reload question to get most recent data --- lib/tasks/test_api.rake | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/tasks/test_api.rake b/lib/tasks/test_api.rake index 0e0ff35..71ebdbd 100644 --- a/lib/tasks/test_api.rake +++ b/lib/tasks/test_api.rake @@ -405,6 +405,8 @@ namespace :test_api do # want to ignore some tests for any question with votes before 2010-02-17 question_has_votes_before_2010_02_17 = question.votes.count(:conditions => ["created_at < ?", '2010-02-17']) > 0 + # reload question to make sure we have most recent data + question.reload question.choices.each do |choice| if choice.wins -- libgit2 0.21.2