From ada571bfcdbad669ae43a4dd18277ef227680a0b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 3 Jul 2012 14:23:42 -0700 Subject: [PATCH] remove the runner method copied from minitest --- .../testing/setup_and_teardown.rb | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index 527fa555b7..ddb7396aa9 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 -- GitLab