diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/test_case_test.rb | 18 | ||||
-rw-r--r-- | activesupport/test/test_test.rb | 4 |
2 files changed, 2 insertions, 20 deletions
diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb index 740c2351ea..b6a96b2ae7 100644 --- a/activesupport/test/test_case_test.rb +++ b/activesupport/test/test_case_test.rb @@ -74,23 +74,5 @@ module ActiveSupport assert_match %r{oh noes}, exception.message end - - def test_teardown_should_scrub_instance_variables - tc = Class.new(TestCase) do - def test_true; @alpha = "a"; assert_equal "a", @alpha; end - end - - test_name = 'test_true' - fr = FakeRunner.new - - test = tc.new test_name - test.run(fr) {} - - passed_var = IS_MINITEST ? :@passed : :@test_passed - ivars = test.instance_variables.map(&:to_sym) - - assert ivars.include?(passed_var), "#{passed_var} should not have been scrubbed" - assert !ivars.include?(:@alpha), "@alpha should have been scrubbed" - end end end diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index ea652844f5..ee5a20c789 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -137,7 +137,7 @@ class SetupAndTeardownTest < ActiveSupport::TestCase def test_inherited_setup_callbacks assert_equal [:reset_callback_record, :foo], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo], @called_back - assert_equal [:scrub_leftover_instance_variables, :foo, :sentinel, :foo], self.class._teardown_callbacks.map(&:raw_filter) + assert_equal [:foo, :sentinel, :foo], self.class._teardown_callbacks.map(&:raw_filter) end def setup @@ -169,7 +169,7 @@ class SubclassSetupAndTeardownTest < SetupAndTeardownTest def test_inherited_setup_callbacks assert_equal [:reset_callback_record, :foo, :bar], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo, :bar], @called_back - assert_equal [:scrub_leftover_instance_variables, :foo, :sentinel, :foo, :bar], self.class._teardown_callbacks.map(&:raw_filter) + assert_equal [:foo, :sentinel, :foo, :bar], self.class._teardown_callbacks.map(&:raw_filter) end protected |