Skip to content

Commit

Permalink
Tidy up tests in previous commit since they did not assure an Ordered…
Browse files Browse the repository at this point in the history
…Hash is returned (the test would pass for an array and would pass by chance for hashes).

[#4875 state:resolved]
  • Loading branch information
josevalim committed Jun 26, 2010
1 parent 9958950 commit aa48ab0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions activesupport/test/ordered_hash_test.rb
Expand Up @@ -259,8 +259,7 @@ def test_update_sets_keys
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

0 comments on commit aa48ab0

Please sign in to comment.