Skip to content
This repository
Browse code

Fixed Mocha deprecation warning

[#856 state:resolved milestone:'Next Release']
  • Loading branch information...
commit 33656f7bac8f5c42167ccbd6deaa053a14e8b9bd 1 parent 9178a40
Stephen Eley authored July 17, 2009 dchelimsky committed July 19, 2009
7  lib/spec/adapters/mock_frameworks/mocha.rb
@@ -5,7 +5,12 @@
5 5
 module Spec
6 6
   module Adapters
7 7
     module MockFramework
8  
-      include Mocha::Standalone
  8
+      # Mocha::Standalone was deprecated as of Mocha 0.9.7.  
  9
+      begin
  10
+        include Mocha::API
  11
+      rescue NameError
  12
+        include Mocha::Standalone
  13
+      end
9 14
       def setup_mocks_for_rspec
10 15
         mocha_setup
11 16
       end

0 notes on commit 33656f7

Please sign in to comment.
Something went wrong with that request. Please try again.