aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/fixtures/company.rb2
-rw-r--r--activerecord/test/reflection_test.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/fixtures/company.rb b/activerecord/test/fixtures/company.rb
index d4a68900fe..5d53898802 100755
--- a/activerecord/test/fixtures/company.rb
+++ b/activerecord/test/fixtures/company.rb
@@ -3,6 +3,8 @@ class Company < ActiveRecord::Base
set_sequence_name :companies_nonstd_seq
validates_presence_of :name
+
+ has_one :dummy_account, :foreign_key => "firm_id", :class_name => "Account"
end
diff --git a/activerecord/test/reflection_test.rb b/activerecord/test/reflection_test.rb
index 6e5d7126f5..27cb40ee4d 100644
--- a/activerecord/test/reflection_test.rb
+++ b/activerecord/test/reflection_test.rb
@@ -128,9 +128,9 @@ class ReflectionTest < Test::Unit::TestCase
end
def test_reflection_of_all_associations
- assert_equal 12, Firm.reflect_on_all_associations.size
+ assert_equal 13, Firm.reflect_on_all_associations.size
assert_equal 11, Firm.reflect_on_all_associations(:has_many).size
- assert_equal 1, Firm.reflect_on_all_associations(:has_one).size
+ assert_equal 2, Firm.reflect_on_all_associations(:has_one).size
assert_equal 0, Firm.reflect_on_all_associations(:belongs_to).size
end