aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2009-02-01 15:27:41 +1300
committerMichael Koziarski <michael@koziarski.com>2009-02-01 15:27:41 +1300
commitfa7aa19a9940a6872efa01b70caf70c7e2915b3f (patch)
tree55da96b4b846996664bd6771de6db9aee51755f7 /activerecord
parent2b8be761e476c103e94f8567c3880ea7363dfec0 (diff)
downloadrails-fa7aa19a9940a6872efa01b70caf70c7e2915b3f.tar.gz
rails-fa7aa19a9940a6872efa01b70caf70c7e2915b3f.tar.bz2
rails-fa7aa19a9940a6872efa01b70caf70c7e2915b3f.zip
Don't rely on the order in these tests
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/nested_attributes_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb
index b982adc4cd..1605684677 100644
--- a/activerecord/test/cases/nested_attributes_test.rb
+++ b/activerecord/test/cases/nested_attributes_test.rb
@@ -239,7 +239,7 @@ module NestedAttributesOnACollectionAssociationTests
attributes['new_2'] = { :name => 'Privateers Greed' } # 2 is lower then 123726353
@pirate.send(association_setter, attributes)
- assert_equal ['Posideons Killer', 'Killer bandita Dionne', 'Privateers Greed', 'Grace OMalley'], @pirate.send(@association_name).map(&:name)
+ assert_equal ['Posideons Killer', 'Killer bandita Dionne', 'Privateers Greed', 'Grace OMalley'].to_set, @pirate.send(@association_name).map(&:name).to_set
end
def test_should_raise_an_argument_error_if_something_else_than_a_hash_is_passed
@@ -271,7 +271,7 @@ module NestedAttributesOnACollectionAssociationTests
assert_difference('@pirate.send(@association_name).count', +1) do
@pirate.update_attributes @alternate_params
end
- assert_equal ['Grace OMalley', 'Privateers Greed', 'Buccaneers Servant'], @pirate.reload.send(@association_name).map(&:name)
+ assert_equal ['Grace OMalley', 'Privateers Greed', 'Buccaneers Servant'].to_set, @pirate.reload.send(@association_name).map(&:name).to_set
end
def test_should_be_possible_to_destroy_a_record