Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tidy up tests in previous commit since they did not assure an Ordered…

…Hash is returned (the test would pass for an array and would pass by chance for hashes).

[#4875 state:resolved]
  • Loading branch information...
commit 0e9190c902d075c70e2f54096ae55476ed47b6a3 1 parent 449cf50
@josevalim josevalim authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/test/ordered_hash_test.rb
View
6 activesupport/test/ordered_hash_test.rb
@@ -230,8 +230,8 @@ 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
+ expected = ActiveSupport::OrderedHash[@values.zip(@keys)]
+ assert_equal expected, @ordered_hash.invert
+ assert_equal @values.zip(@keys), @ordered_hash.invert.to_a
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.