From e58ad8ed9cb0e67fde93c7edc8a0e13b8bc342ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 30 Dec 2009 11:09:27 +0100 Subject: Setup and teardown now use new callbacks. --- activesupport/test/test_test.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'activesupport/test/test_test.rb') 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 -- cgit v1.2.3