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:
parent
66ed4aa98b
commit
6ce84bdc5b
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ module Shindo
|
||||||
format.delete(key)
|
format.delete(key)
|
||||||
case value
|
case value
|
||||||
when Array
|
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?
|
if datum.is_a?(Array) && !value.empty?
|
||||||
for element in datum
|
for element in datum
|
||||||
type = value.first
|
type = value.first
|
||||||
|
@ -56,7 +56,7 @@ module Shindo
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when Hash
|
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)
|
valid &&= formats_kernel(datum, value, false)
|
||||||
else
|
else
|
||||||
p "#{key.inspect} not #{value.inspect}: #{datum.inspect}" unless datum.is_a?(value)
|
p "#{key.inspect} not #{value.inspect}: #{datum.inspect}" unless datum.is_a?(value)
|
||||||
|
|
Loading…
Add table
Reference in a new issue