public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Check for mocha gem without requiring the lib.  [#403 state:resolved]
jeremy (author)
Sun Jun 22 20:52:29 -0700 2008
commit  4d5ac3f3d2e1667971752c9a4e536de1a5bec364
tree    a4ba362120c09947499ffc512c6cbbb21a8039fd
parent  baddea95e183b3bef290ec433f917ee8cd806934
...
18
19
20
21
 
22
23
 
24
25
26
...
18
19
20
 
21
22
 
23
24
25
26
0
@@ -18,9 +18,9 @@ module ActiveSupport
0
             alias_method :run, :run_with_callbacks_and_miniunit
0
           else
0
             begin
0
-              require 'mocha'
0
+              gem 'mocha'
0
               alias_method :run, :run_with_callbacks_and_mocha
0
-            rescue LoadError
0
+            rescue Gem::LoadError
0
               alias_method :run, :run_with_callbacks_and_testunit
0
             end
0
           end

Comments