Permalink
Browse files

webmock/rspec checks whether rspec/expectations is already loaded by …

…checking if RSpec::Expectations::ExpectationNotMetError is defined. This is required for compatibility with RSpec 2.10.0.
  • Loading branch information...
1 parent 418c9aa commit 7bc4f70eeaefcc86bd8a92b582b158cb70072d6d @bblimke committed May 12, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/webmock/rspec.rb
  2. +1 −1 webmock.gemspec
View
@@ -1,7 +1,7 @@
require 'webmock'
# RSpec 1.x and 2.x compatibility
-if defined?(RSpec) && defined?(RSpec::Expectations)
+if defined?(RSpec::Expectations::ExpectationNotMetError)
RSPEC_NAMESPACE = RSPEC_CONFIGURER = RSpec
elsif defined?(Spec) && defined?(Spec.configure)
RSPEC_NAMESPACE = Spec
View
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.add_dependency 'addressable', '>= 2.2.7'
s.add_dependency 'crack', '>=0.1.7'
- s.add_development_dependency 'rspec', '~> 2.8'
+ s.add_development_dependency 'rspec', '~> 2.10'
s.add_development_dependency 'httpclient', '>= 2.2.4'
s.add_development_dependency 'patron', '>= 0.4.18' unless RUBY_PLATFORM =~ /java/
s.add_development_dependency 'em-http-request', '>= 1.0.2'

0 comments on commit 7bc4f70

Please sign in to comment.