1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[tests] more helpful formats helper errors

This commit is contained in:
geemus 2011-09-23 16:58:39 -05:00
parent 66ed4aa98b
commit 6ce84bdc5b

View file

@ -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)