From fa7aa19a9940a6872efa01b70caf70c7e2915b3f Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sun, 1 Feb 2009 15:27:41 +1300 Subject: Don't rely on the order in these tests --- activerecord/test/cases/nested_attributes_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') 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 -- cgit v1.2.3