diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-08 19:14:35 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-08 19:14:35 -0300 |
commit | 952014315926d370f2a0b681cb765948bf2e6883 (patch) | |
tree | 3abfe7e82554c09df4b2fe8a170e90cf1f0bcf02 /activerecord/test/cases/associations/belongs_to_associations_test.rb | |
parent | ae9e1e9f6d08bbd5f5c1512b72d495168e9fa5e5 (diff) | |
parent | ed8a0a1c2370ab8715434ba824b2826d807401d5 (diff) | |
download | rails-952014315926d370f2a0b681cb765948bf2e6883.tar.gz rails-952014315926d370f2a0b681cb765948bf2e6883.tar.bz2 rails-952014315926d370f2a0b681cb765948bf2e6883.zip |
Merge commit 'rails/master'
Conflicts:
activerecord/test/cases/adapter_test.rb
activerecord/test/cases/method_scoping_test.rb
Diffstat (limited to 'activerecord/test/cases/associations/belongs_to_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/belongs_to_associations_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index ab6f752243..784c484178 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -293,7 +293,8 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase def test_new_record_with_foreign_key_but_no_object c = Client.new("firm_id" => 1) - assert_equal Firm.find(:first), c.firm_with_basic_id + # sometimes tests on Oracle fail if ORDER BY is not provided therefore add always :order with :first + assert_equal Firm.find(:first, :order => "id"), c.firm_with_basic_id end def test_forgetting_the_load_when_foreign_key_enters_late @@ -301,7 +302,8 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase assert_nil c.firm_with_basic_id c.firm_id = 1 - assert_equal Firm.find(:first), c.firm_with_basic_id + # sometimes tests on Oracle fail if ORDER BY is not provided therefore add always :order with :first + assert_equal Firm.find(:first, :order => "id"), c.firm_with_basic_id end def test_field_name_same_as_foreign_key |