Permalink
Browse files

fix tests relying on implicit ordering

  • Loading branch information...
1 parent 1092c18 commit ca48da6300ff0b49ae4125dc582f3c4666481005 @jeremy jeremy committed Aug 26, 2008
@@ -647,8 +647,7 @@ def test_assign_ids
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 @@ def test_assign_ids_ignoring_blanks
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

0 comments on commit ca48da6

Please sign in to comment.