Commit 68e20c016d8b7d7fa8c0dd4593fac3dc19ab3c29

Authored by Luke Baker
1 parent 69f189df

skip test for certain questions

before 2010-02-17 we did not track losses, so for any question with
votes prior to that date we skip some tests.
Showing 1 changed file with 6 additions and 4 deletions   Show diff stats
lib/tasks/test_api.rake
... ... @@ -465,10 +465,12 @@ namespace :test_api do
465 465 error_bool = true
466 466 end
467 467  
468   - if(total_scores_lte_fifty == question.choices.size || total_scores_gte_fifty == question.choices.size) && (total_scores_lte_fifty != total_scores_gte_fifty)
469   - error_message += "Error: The scores of all choices are either all above 50, or all below 50. This is probably wrong\n"
470   - error_bool = true
471   - puts "Error score fifty: #{question.id}"
  468 + unless question_has_votes_before_2010_02_17
  469 + if(total_scores_lte_fifty == question.choices.size || total_scores_gte_fifty == question.choices.size) && (total_scores_lte_fifty != total_scores_gte_fifty)
  470 + error_message += "Error: The scores of all choices are either all above 50, or all below 50. This is probably wrong\n"
  471 + error_bool = true
  472 + puts "Error score fifty: #{question.id}"
  473 + end
472 474 end
473 475  
474 476 if error_bool
... ...