From 5d15fae2c64c756400d0bfca8d932394e9d15511 Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Fri, 17 Jun 2011 10:50:15 -0400 Subject: [PATCH] update appearances test to have cleaner output --- lib/tasks/test_api.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/test_api.rake b/lib/tasks/test_api.rake index 2590183..2c5c265 100644 --- a/lib/tasks/test_api.rake +++ b/lib/tasks/test_api.rake @@ -50,8 +50,8 @@ namespace :test_api do def verify_choice_appearances_and_votes(choice) success_message = "Choice has more appearances than votes and skips" - prompts_on_left = choice.prompts_on_the_left { |p| p.id } - prompts_on_right = choice.prompts_on_the_right { |p| p.id } + prompts_on_left = choice.prompts_on_the_left.map { |p| p.id } + prompts_on_right = choice.prompts_on_the_right.map { |p| p.id } all_prompt_ids = prompts_on_left + prompts_on_right all_appearances = Appearance.count(:conditions => { :prompt_id => all_prompt_ids}) skips = Skip.count(:conditions => {:prompt_id => all_prompt_ids}) @@ -462,7 +462,7 @@ namespace :test_api do unless question_has_votes_before_2010_02_17 message, error_occurred = verify_choice_appearances_and_votes(choice) if error_occurred - error_message += message + error_message += message + "\n" end end -- libgit2 0.21.2