From 6ce84bdc5bbc4b7a1497d9d3b3e1d4021c2b96c8 Mon Sep 17 00:00:00 2001 From: geemus Date: Fri, 23 Sep 2011 16:58:39 -0500 Subject: [PATCH] [tests] more helpful formats helper errors --- tests/helpers/formats_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/helpers/formats_helper.rb b/tests/helpers/formats_helper.rb index 3409f660b..9c5073fa8 100644 --- a/tests/helpers/formats_helper.rb +++ b/tests/helpers/formats_helper.rb @@ -44,7 +44,7 @@ module Shindo format.delete(key) case value when Array - valid &&= datum.is_a?(Array) || p("not Array: #{datum.inspect}") + valid &&= datum.is_a?(Array) || p("#{key.inspect} not Array: #{datum.inspect}") if datum.is_a?(Array) && !value.empty? for element in datum type = value.first @@ -56,7 +56,7 @@ module Shindo end end when Hash - valid &&= datum.is_a?(Hash) || p("not Hash: #{datum.inspect}") + valid &&= datum.is_a?(Hash) || p("#{key.inspect} not Hash: #{datum.inspect}") valid &&= formats_kernel(datum, value, false) else p "#{key.inspect} not #{value.inspect}: #{datum.inspect}" unless datum.is_a?(value)