Sha256: 86916861d5e3a32ca079d4168d1ad714b29d570f355ffbb357eb585165c2c363

Contents?: true

Size: 674 Bytes

Versions: 14

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

14 entries across 14 versions & 1 rubygems

Version Path
rspeckled-0.0.30 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.29 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.28 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.27 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.26 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.25 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.24 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.23 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.22 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.21 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.20 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.19 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.18 lib/rspeckled/plugins/webmock.rb
rspeckled-0.0.17 lib/rspeckled/plugins/webmock.rb