diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-25 23:53:31 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-25 23:53:31 -0700 |
commit | ca48da6300ff0b49ae4125dc582f3c4666481005 (patch) | |
tree | 485b2ea5137e5d30633104a1a1b769c576e9fc0a /activerecord/test/cases | |
parent | 1092c181b5568d06e84f6a3253aaca81c02a2b2c (diff) | |
download | rails-ca48da6300ff0b49ae4125dc582f3c4666481005.tar.gz rails-ca48da6300ff0b49ae4125dc582f3c4666481005.tar.bz2 rails-ca48da6300ff0b49ae4125dc582f3c4666481005.zip |
fix tests relying on implicit ordering
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb index 432d245b5b..917c241346 100644 --- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb @@ -647,8 +647,7 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase developer.save developer.reload assert_equal 2, developer.projects.length - assert_equal projects(:active_record), developer.projects[0] - assert_equal projects(:action_controller), developer.projects[1] + assert_equal [projects(:active_record), projects(:action_controller)].map(&:id).sort, developer.projects_ids end def test_assign_ids_ignoring_blanks @@ -657,8 +656,7 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase developer.save developer.reload assert_equal 2, developer.projects.length - assert_equal projects(:active_record), developer.projects[0] - assert_equal projects(:action_controller), developer.projects[1] + assert_equal [projects(:active_record), projects(:action_controller)].map(&:id).sort, developer.projects_ids end def test_select_limited_ids_list |