Commit 09dda694a3f9427ef73940e879533c8df054a080

Authored by Luke Baker
1 parent e976c0e7

make irregular apppearances test only seed ideas

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/tasks/test_api.rake
... ... @@ -551,8 +551,8 @@ namespace :test_api do
551 551 success_message = "Each choice has appeared n times, where n falls within 6 stddevs of the mean number of appearances for a question " +
552 552 "(Note: this applies only to seed choices (not user submitted) and choices currently marked active)"
553 553  
554   - wins_by_choice_id = question.votes.active.count(:group => :choice_id)
555   - losses_by_choice_id= question.votes.active_loser.count(:group => :loser_choice_id)
  554 + wins_by_choice_id = question.votes.active.count(:group => :choice_id, :conditions => ["creator_id = ?", question.creator_id])
  555 + losses_by_choice_id= question.votes.active_loser.count(:group => :loser_choice_id, :conditions => ["creator_id = ?", question.creator_id])
556 556  
557 557 #Rails returns an ordered hash, which doesn't allow for blocks to change merging logic.
558 558 #A little hack to create a normal hash
... ...