Permalink
Browse files

Check for mocha gem without requiring the lib. [#403 state:resolved]

  • Loading branch information...
1 parent baddea9 commit 4d5ac3f3d2e1667971752c9a4e536de1a5bec364 @jeremy jeremy committed Jun 23, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/testing/setup_and_teardown.rb
View
4 activesupport/lib/active_support/testing/setup_and_teardown.rb
@@ -18,9 +18,9 @@ def self.included(base)
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

0 comments on commit 4d5ac3f

Please sign in to comment.