test/array_test.rb in rumonade-0.4.2 vs test/array_test.rb in rumonade-0.4.3
- old
+ new
@@ -54,6 +54,11 @@
assert_equal [Some(Some(1)), Some(Some(None)), [None]], [Some(Some(1)), Some(Some(None)), [None]].flatten(0)
assert_equal [Some(1), Some(None), None], [Some(Some(1)), Some(Some(None)), [None]].flatten(1)
assert_equal [1, None], [Some(Some(1)), Some(Some(None)), [None]].flatten(2)
assert_equal [1], [Some(Some(1)), Some(Some(None)), [None]].flatten(3)
end
-end
\ No newline at end of file
+
+ def test_flatten_does_not_break_default_ruby_behaviour_with_nested_hash
+ arr = [ { 'thou' => 'shalt', 'not touch' => 'hashes' }, ', seriously!' ]
+ assert_equal arr, arr.flatten
+ end
+end