From 4d5ac3f3d2e1667971752c9a4e536de1a5bec364 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 22 Jun 2008 20:52:29 -0700 Subject: Check for mocha gem without requiring the lib. [#403 state:resolved] --- activesupport/lib/active_support/testing/setup_and_teardown.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index 21d71eb92a..d934246d4d 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -18,9 +18,9 @@ module ActiveSupport alias_method :run, :run_with_callbacks_and_miniunit else begin - require 'mocha' + gem 'mocha' alias_method :run, :run_with_callbacks_and_mocha - rescue LoadError + rescue Gem::LoadError alias_method :run, :run_with_callbacks_and_testunit end end -- cgit v1.2.3