Sha256: ac91961d2b0c35292430276899bff01a24d78f98a05bbd171e9e3e56bd8195ee

Contents?: true

Size: 887 Bytes

Versions: 22

Compression:

Stored size: 887 Bytes

Contents

require 'webmock'

# RSpec 1.x and 2.x compatibility
if defined?(RSpec::Expectations::ExpectationNotMetError)
  RSPEC_NAMESPACE = RSPEC_CONFIGURER = RSpec
elsif defined?(Spec) && defined?(Spec.configure)
  RSPEC_NAMESPACE = Spec
  RSPEC_CONFIGURER = Spec::Runner
else
  begin
    require 'rspec/core'
    require 'rspec/expectations'
    RSPEC_NAMESPACE = RSPEC_CONFIGURER = RSpec
  rescue LoadError
    require 'spec'
    RSPEC_NAMESPACE = Spec
    RSPEC_CONFIGURER = Spec::Runner
  end
end

require 'webmock/rspec/matchers'

RSPEC_CONFIGURER.configure { |config|

  config.include WebMock::API
  config.include WebMock::Matchers

  config.before(:suite) do
    WebMock.enable!
  end

  config.after(:suite) do
    WebMock.disable!
  end

  config.after(:each) do
    WebMock.reset!
  end
}

WebMock::AssertionFailure.error_class = RSPEC_NAMESPACE::Expectations::ExpectationNotMetError

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
webmock-3.8.3 lib/webmock/rspec.rb
webmock-3.8.2 lib/webmock/rspec.rb
webmock-3.8.1 lib/webmock/rspec.rb
webmock-3.8.0 lib/webmock/rspec.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/webmock-3.6.0/lib/webmock/rspec.rb
webmock-3.7.6 lib/webmock/rspec.rb
webmock-3.7.5 lib/webmock/rspec.rb
webmock-3.7.4 lib/webmock/rspec.rb
webmock-3.7.3 lib/webmock/rspec.rb
webmock-3.7.2 lib/webmock/rspec.rb
webmock-3.7.1 lib/webmock/rspec.rb
webmock-3.7.0 lib/webmock/rspec.rb
webmock-3.6.2 lib/webmock/rspec.rb
webmock-3.6.0 lib/webmock/rspec.rb
webmock-3.5.1 lib/webmock/rspec.rb
webmock-3.5.0 lib/webmock/rspec.rb
webmock-3.4.2 lib/webmock/rspec.rb
webmock-3.4.1 lib/webmock/rspec.rb
webmock-3.4.0 lib/webmock/rspec.rb
webmock-3.3.0 lib/webmock/rspec.rb