Sha256: a3906858237b5c9bc4f2d7fe0f828d1f1f3546dc59e83dd434d8bfae2dabb033

Contents?: true

Size: 415 Bytes

Versions: 14

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

require 'webmock/rspec'

RSpec.configure do |config|
  config.around(:each, :webmock => lambda { |v| !!v }) do |example|
    options = example.metadata[:web_mock]
    options = case options
              when TrueClass
                { :allow_localhost => true }
              end

    WebMock.disable_net_connect!(options)

    example.run

    WebMock.allow_net_connect!
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rspeckled-1.0.3 lib/rspeckled/plugins/webmock.rb
rspeckled-1.0.2 lib/rspeckled/plugins/webmock.rb
rspeckled-1.0.1 lib/rspeckled/plugins/webmock.rb
rspeckled-1.0.0 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.64 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.63 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.62 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.61 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.60 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.59 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.58 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.57 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.56 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.55 lib/rspeckled/plugins/webmock.rb