Sha256: 1865d6cfe177e14c586b027071423079c755da5d421f9be593b72e5f8d18cdd9

Contents?: true

Size: 674 Bytes

Versions: 24

Compression:

Stored size: 674 Bytes

Contents

# frozen_string_literal: true

##############################################################################
#                              WebMock Plugin
##############################################################################

begin
  require 'webmock/rspec'

  RSpec.configure do |config|
    config.around(:each, :web_mock => 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
rescue LoadError
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rspeckled-0.0.54 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.53 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.52 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.51 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.50 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.49 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.48 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.47 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.46 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.45 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.44 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.43 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.42 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.41 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.40 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.39 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.38 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.37 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.36 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.35 lib/rspeckled/plugins/webmock.rb