diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-30 13:48:20 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-30 13:48:20 -0800 |
commit | 17787fbfdbb1aa8fa8838e447e9acc7068eab130 (patch) | |
tree | 5cdb0262dcea0e52b800434179e6307878c8399a /activesupport/test | |
parent | bb153f42e45160c5ef3593c393db5d3c6857fb70 (diff) | |
parent | 97a64b6b22d87cb6f89a224f7832433b86b545c0 (diff) | |
download | rails-17787fbfdbb1aa8fa8838e447e9acc7068eab130.tar.gz rails-17787fbfdbb1aa8fa8838e447e9acc7068eab130.tar.bz2 rails-17787fbfdbb1aa8fa8838e447e9acc7068eab130.zip |
Merge commit 'josevalim/callbacks'
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/test_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index 5cbffb81fc..1928da51ca 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -102,9 +102,9 @@ class SetupAndTeardownTest < ActiveSupport::TestCase teardown :foo, :sentinel, :foo def test_inherited_setup_callbacks - assert_equal [:reset_callback_record, :foo], self.class.setup_callback_chain.map(&:method) + assert_equal [:reset_callback_record, :foo], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo], @called_back - assert_equal [:foo, :sentinel, :foo], self.class.teardown_callback_chain.map(&:method) + assert_equal [:foo, :sentinel, :foo], self.class._teardown_callbacks.map(&:raw_filter) end def setup @@ -114,6 +114,7 @@ class SetupAndTeardownTest < ActiveSupport::TestCase end protected + def reset_callback_record @called_back = [] end @@ -133,9 +134,9 @@ class SubclassSetupAndTeardownTest < SetupAndTeardownTest teardown :bar def test_inherited_setup_callbacks - assert_equal [:reset_callback_record, :foo, :bar], self.class.setup_callback_chain.map(&:method) + assert_equal [:reset_callback_record, :foo, :bar], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo, :bar], @called_back - assert_equal [:foo, :sentinel, :foo, :bar], self.class.teardown_callback_chain.map(&:method) + assert_equal [:foo, :sentinel, :foo, :bar], self.class._teardown_callbacks.map(&:raw_filter) end protected |