aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/inverse_associations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations/inverse_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/inverse_associations_test.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb
index 1d7604f52b..34d24a2948 100644
--- a/activerecord/test/cases/associations/inverse_associations_test.rb
+++ b/activerecord/test/cases/associations/inverse_associations_test.rb
@@ -23,39 +23,39 @@ class InverseAssociationTests < ActiveRecord::TestCase
def test_should_be_able_to_ask_a_reflection_if_it_has_an_inverse
has_one_with_inverse_ref = Man.reflect_on_association(:face)
- assert has_one_with_inverse_ref.respond_to?(:has_inverse?)
+ assert_respond_to has_one_with_inverse_ref, :has_inverse?
assert has_one_with_inverse_ref.has_inverse?
has_many_with_inverse_ref = Man.reflect_on_association(:interests)
- assert has_many_with_inverse_ref.respond_to?(:has_inverse?)
+ assert_respond_to has_many_with_inverse_ref, :has_inverse?
assert has_many_with_inverse_ref.has_inverse?
belongs_to_with_inverse_ref = Face.reflect_on_association(:man)
- assert belongs_to_with_inverse_ref.respond_to?(:has_inverse?)
+ assert_respond_to belongs_to_with_inverse_ref, :has_inverse?
assert belongs_to_with_inverse_ref.has_inverse?
has_one_without_inverse_ref = Club.reflect_on_association(:sponsor)
- assert has_one_without_inverse_ref.respond_to?(:has_inverse?)
+ assert_respond_to has_one_without_inverse_ref, :has_inverse?
assert !has_one_without_inverse_ref.has_inverse?
has_many_without_inverse_ref = Club.reflect_on_association(:memberships)
- assert has_many_without_inverse_ref.respond_to?(:has_inverse?)
+ assert_respond_to has_many_without_inverse_ref, :has_inverse?
assert !has_many_without_inverse_ref.has_inverse?
belongs_to_without_inverse_ref = Sponsor.reflect_on_association(:sponsor_club)
- assert belongs_to_without_inverse_ref.respond_to?(:has_inverse?)
+ assert_respond_to belongs_to_without_inverse_ref, :has_inverse?
assert !belongs_to_without_inverse_ref.has_inverse?
end
def test_should_be_able_to_ask_a_reflection_what_it_is_the_inverse_of
has_one_ref = Man.reflect_on_association(:face)
- assert has_one_ref.respond_to?(:inverse_of)
+ assert_respond_to has_one_ref, :inverse_of
has_many_ref = Man.reflect_on_association(:interests)
- assert has_many_ref.respond_to?(:inverse_of)
+ assert_respond_to has_many_ref, :inverse_of
belongs_to_ref = Face.reflect_on_association(:man)
- assert belongs_to_ref.respond_to?(:inverse_of)
+ assert_respond_to belongs_to_ref, :inverse_of
end
def test_inverse_of_method_should_supply_the_actual_reflection_instance_it_is_the_inverse_of