diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-30 11:09:27 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-12-30 11:09:27 +0100 |
commit | e58ad8ed9cb0e67fde93c7edc8a0e13b8bc342ae (patch) | |
tree | 96b719af681337ba7020b5e2d58b73e25a987696 /activesupport/test/test_test.rb | |
parent | 97204fc0bc52af8fb6714e6f9fcd414567e0fc1a (diff) | |
download | rails-e58ad8ed9cb0e67fde93c7edc8a0e13b8bc342ae.tar.gz rails-e58ad8ed9cb0e67fde93c7edc8a0e13b8bc342ae.tar.bz2 rails-e58ad8ed9cb0e67fde93c7edc8a0e13b8bc342ae.zip |
Setup and teardown now use new callbacks.
Diffstat (limited to 'activesupport/test/test_test.rb')
-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 |