aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-07-31 18:19:36 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-07-31 18:19:36 -0700
commitf25251b5734a2a0934d60dd99c93dfd3d42f2c6c (patch)
treefd95adaf579b94fdf104097f10f7e07e390e929a /activerecord/test
parentafa510ed690119cc61e0681d494053de740c79c8 (diff)
downloadrails-f25251b5734a2a0934d60dd99c93dfd3d42f2c6c.tar.gz
rails-f25251b5734a2a0934d60dd99c93dfd3d42f2c6c.tar.bz2
rails-f25251b5734a2a0934d60dd99c93dfd3d42f2c6c.zip
do is_a? tests on assignment so runtime is faster
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/associations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index c3b728296e..48e6fc5cd4 100644
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -278,7 +278,7 @@ class OverridingAssociationsTest < ActiveRecord::TestCase
def test_habtm_association_redefinition_callbacks_should_differ_and_not_inherited
# redeclared association on AR descendant should not inherit callbacks from superclass
callbacks = PeopleList.before_add_for_has_and_belongs_to_many
- assert_equal([:enlist], callbacks)
+ assert_equal(1, callbacks.length)
callbacks = DifferentPeopleList.before_add_for_has_and_belongs_to_many
assert_equal([], callbacks)
end
@@ -286,7 +286,7 @@ class OverridingAssociationsTest < ActiveRecord::TestCase
def test_has_many_association_redefinition_callbacks_should_differ_and_not_inherited
# redeclared association on AR descendant should not inherit callbacks from superclass
callbacks = PeopleList.before_add_for_has_many
- assert_equal([:enlist], callbacks)
+ assert_equal(1, callbacks.length)
callbacks = DifferentPeopleList.before_add_for_has_many
assert_equal([], callbacks)
end