Commit 48f5de5ffa55cadc1b01eddb799e34f6357e468d

Authored by Luke Baker
1 parent 49399803

irregular appearances only tests if choice has > 10 appearances

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/tasks/test_api.rake
... ... @@ -319,9 +319,9 @@ namespace :test_api do
319 319  
320 320 # this choice appears to have been deactivated then reactivated after
321 321 # a period of voting
322   - ignore_choices = [133189, 196277]
  322 + ignore_choices = [133189]
323 323 appearances_by_choice_id.each do |choice_id, n_i|
324   - if ((n_i < (mean - 6*stddev)) || (n_i > mean + 6 *stddev)) && !ignore_choices.include?(choice_id) && Choice.find(choice_id).active?
  324 + if (n_i > 10 && (n_i < (mean - 6*stddev)) || (n_i > mean + 6 *stddev)) && !ignore_choices.include?(choice_id) && Choice.find(choice_id).active?
325 325 error_message = "Choice #{choice_id} in Question ##{question.id} has an irregular number of appearances: #{n_i}, as compared to the mean: #{mean} and stddev #{stddev} for this question\n"
326 326 end
327 327 end
... ...