diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-30 11:09:27 +0100 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-12-30 13:40:37 -0800 |
commit | a6e2d16b1ef1fbde28325f0e0e2b8855d6a7606c (patch) | |
tree | d545464ccf7a957a058192e54d0c614c54feb5d3 /activesupport/test | |
parent | bb153f42e45160c5ef3593c393db5d3c6857fb70 (diff) | |
download | rails-a6e2d16b1ef1fbde28325f0e0e2b8855d6a7606c.tar.gz rails-a6e2d16b1ef1fbde28325f0e0e2b8855d6a7606c.tar.bz2 rails-a6e2d16b1ef1fbde28325f0e0e2b8855d6a7606c.zip |
Setup and teardown now use new 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 |