Permalink
Browse files

Fixed Mocha deprecation warning

[#856 state:resolved milestone:'Next Release']
  • Loading branch information...
SFEley authored and dchelimsky committed Jul 17, 2009
1 parent 9178a40 commit 33656f7bac8f5c42167ccbd6deaa053a14e8b9bd
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/spec/adapters/mock_frameworks/mocha.rb
@@ -5,7 +5,12 @@
module Spec
module Adapters
module MockFramework
- include Mocha::Standalone
+ # Mocha::Standalone was deprecated as of Mocha 0.9.7.
+ begin
+ include Mocha::API
+ rescue NameError
+ include Mocha::Standalone
+ end
def setup_mocks_for_rspec
mocha_setup
end

0 comments on commit 33656f7

Please sign in to comment.