From 8b086743183b01393b40dda00611127ac7b63d14 Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Mon, 16 Jan 2012 11:59:55 -0500 Subject: [PATCH] have choice tasks use cleanup_args method --- lib/tasks/test_api.rake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/tasks/test_api.rake b/lib/tasks/test_api.rake index 34def11..b84538e 100644 --- a/lib/tasks/test_api.rake +++ b/lib/tasks/test_api.rake @@ -40,8 +40,11 @@ namespace :test_api do namespace :choice do desc "Ensure that cached prompt counts are valid for a choice" task :verify_cached_prompt_counts, [:choice_id] => :environment do |t, args| - choice = Choice.find(args[:choice_id]) - puts verify_cached_prompt_counts(choice).inspect + a = clean_up_args(args) + choices = Choice.find(a[:choice_id]) + choices.each do |choice| + puts verify_cached_prompt_counts(choice).inspect + end end def verify_cached_prompt_counts(choice) @@ -54,8 +57,11 @@ namespace :test_api do desc "Ensure that an idea: appearances on left + appearances on right >= (wins + losses + skips)" task :verify_choice_appearances_and_votes, [:choice_id] => :environment do |t, args| - choice = Choice.find(args[:choice_id]) - puts verify_choice_appearances_and_votes(choice).inspect + a = clean_up_args(args) + choices = Choice.find(a[:choice_id]) + choices.each do |choice| + puts verify_choice_appearances_and_votes(choice).inspect + end end def verify_choice_appearances_and_votes(choice) -- libgit2 0.21.2