diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index f67d85603acc3ba888d7017e53463019b5d93a6e..2d939dc3d7715116ef86419ccc612950c727adea 100644 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -352,8 +352,8 @@ def test_inheritance_without_mapping end def test_scope_inherited_properly - assert_nothing_raised { Company.of_first_firm } - assert_nothing_raised { Client.of_first_firm } + assert_nothing_raised { Company.of_first_firm.to_sql } + assert_nothing_raised { Client.of_first_firm.to_sql } end end diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 1dcd9fc21e28781451630b5a04b2d2d67d134547..dd890909ab23a12c48728bf1c762ace2a7192737 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -12,7 +12,7 @@ class Company < AbstractCompany has_many :developers, :through => :contracts scope :of_first_firm, lambda { - joins(:account => :firm). + joins(:accounts => :firm). where('firms.id' => 1) }