Sha256: 66ac2c6f5e121b98fd176bab9a3eed4d89aaca6d758bd5d99389165b9227703d

Contents?: true

Size: 945 Bytes

Versions: 13

Compression:

Stored size: 945 Bytes

Contents

# frozen_string_literal: true

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.around(:each) do |example|
    example.run
    WebMock.reset!
  end
}

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

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/webmock-3.23.1/lib/webmock/rspec.rb
webmock-3.24.0 lib/webmock/rspec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/webmock-3.23.1/lib/webmock/rspec.rb
webmock-3.23.0 lib/webmock/rspec.rb
webmock-3.22.0 lib/webmock/rspec.rb
webmock-3.21.2 lib/webmock/rspec.rb
webmock-3.21.1 lib/webmock/rspec.rb
webmock-3.21.0 lib/webmock/rspec.rb
webmock-3.20.0 lib/webmock/rspec.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/webmock-3.19.1/lib/webmock/rspec.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/webmock-3.19.1/lib/webmock/rspec.rb
webmock-3.19.1 lib/webmock/rspec.rb
webmock-3.19.0 lib/webmock/rspec.rb