1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Tidy up tests in previous commit since they did not assure an OrderedHash is returned (the test would pass for an array and would pass by chance for hashes).

[#4875 state:resolved]
This commit is contained in:
José Valim 2010-06-26 12:09:40 +02:00
parent 9958950f78
commit aa48ab05f4

View file

@ -259,8 +259,7 @@ class OrderedHashTest < Test::Unit::TestCase
end
def test_invert
@ordered_hash = ActiveSupport::OrderedHash[[["foo", "FOO"], ["bar", "BAR"]]]
@inverted_ordered_hash = @ordered_hash.invert
assert_equal [["FOO", "foo"], ["BAR", "bar"]], @inverted_ordered_hash.to_a
assert_kind_of ActiveSupport::OrderedHash, @ordered_hash.invert
assert_equal @values.zip(@keys), @ordered_hash.invert.to_a
end
end