From b332891b2ab4188e9d39737f4d214812afa3ce2c Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 22 Mar 2012 11:08:04 -0300 Subject: Add order to tests that rely on db ordering, to fix failing tests on pg Also skip persistente tests related to UPDATE + ORDER BY for postgresql PostgreSQL does not support updates with order by, and these tests are failing randomly depending on the fixture loading order now. --- activerecord/test/cases/nested_attributes_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/nested_attributes_test.rb') diff --git a/activerecord/test/cases/nested_attributes_test.rb b/activerecord/test/cases/nested_attributes_test.rb index 15c45ca60e..817898f190 100644 --- a/activerecord/test/cases/nested_attributes_test.rb +++ b/activerecord/test/cases/nested_attributes_test.rb @@ -876,7 +876,7 @@ class TestNestedAttributesWithNonStandardPrimaryKeys < ActiveRecord::TestCase def test_should_update_existing_records_with_non_standard_primary_key @owner.update_attributes(@params) - assert_equal ['Foo', 'Bar'], @owner.pets.map(&:name) + assert_equal %w(Bar Foo), @owner.pets.map(&:name).sort end def test_attr_accessor_of_child_should_be_value_provided_during_update_attributes -- cgit v1.2.3