aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/testing/setup_and_teardown.rb27
1 files 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 @@ module ActiveSupport
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