From d84d99a8f7dc672b050a6ab891c1680a323a7c97 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 19 Jul 2008 10:52:30 -0500 Subject: Undefine old run method --- activesupport/lib/active_support/testing/setup_and_teardown.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index 21d71eb92a..a514b61fea 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -15,12 +15,15 @@ module ActiveSupport define_callbacks :setup, :teardown if defined?(::Mini) + undef_method :run alias_method :run, :run_with_callbacks_and_miniunit else begin require 'mocha' + undef_method :run alias_method :run, :run_with_callbacks_and_mocha rescue LoadError + undef_method :run alias_method :run, :run_with_callbacks_and_testunit end end -- cgit v1.2.3