Skip to content

Commit

Permalink
fix formats tests to handle empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Jan 22, 2011
1 parent 825f60c commit 9a0606e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/helpers/formats_helper.rb
Expand Up @@ -39,7 +39,7 @@ def formats_kernel(original_data, original_format, original = true)
case value
when Array
valid &&= datum.is_a?(Array)
if datum.is_a?(Array)
if datum.is_a?(Array) && !value.empty?
for element in datum
type = value.first
if type.is_a?(Hash)
Expand Down

0 comments on commit 9a0606e

Please sign in to comment.