diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index 527fa555b7b12ec538f77f366a8c48fcc2dd7290..ddb7396aa95dc363912e186eea007b2c0ab79053 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -30,28 +30,15 @@ def teardown(*args, &block) end end - def run(runner) - result = '.' - begin - run_callbacks :setup do - result = super - end - rescue *PASSTHROUGH_EXCEPTIONS - raise - rescue Exception => e - result = runner.puke(self.class, method_name, e) - ensure - begin - run_callbacks :teardown - rescue *PASSTHROUGH_EXCEPTIONS - raise - rescue Exception => e - result = runner.puke(self.class, method_name, e) - end - end - result + def before_setup + super + run_callbacks :setup end + def after_teardown + run_callbacks :teardown + super + end end end end