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  8636df7b5572b996cee0bfb59f9804825b3030d2
tree    ebacdd12ff9559917010dc514b54cb8b1eca989e
parent  a2eab629dcd90792b5a392e89d6260301b6fd485
...
14
15
16
17
 
18
19
 
20
21
22
...
14
15
16
 
17
18
 
19
20
21
22
0
@@ -14,9 +14,9 @@ module ActiveSupport
0
         base.define_callbacks :setup, :teardown
0
 
0
         begin
0
-          require 'mocha'
0
+          gem 'mocha'
0
           base.alias_method_chain :run, :callbacks_and_mocha
0
-        rescue LoadError
0
+        rescue Gem::LoadError
0
           base.alias_method_chain :run, :callbacks
0
         end
0
       end

Comments