Sha256: 596d20236141d3b2902352342138f346ad16603642d470350aad39694db0ac83

Contents?: true

Size: 363 Bytes

Versions: 5

Compression:

Stored size: 363 Bytes

Contents

begin
  require 'webmock/rspec'

  RSpec.configure do |config|
    config.around(:each, :web_mock => lambda { |v| !!v }) do |example|
      options = example.metadata[:web_mock]
      options = options.is_a?(Hash) ? options : {}

      WebMock.disable_net_connect!(options)

      example.run

      WebMock.allow_net_connect!
    end
  end

rescue LoadError
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rspectacular-0.12.0 lib/rspectacular/plugins/webmock.rb
rspectacular-0.11.1 lib/rspectacular/plugins/webmock.rb
rspectacular-0.11.0 lib/rspectacular/plugins/webmock.rb
rspectacular-0.10.1 lib/rspectacular/plugins/webmock.rb
rspectacular-0.10.0 lib/rspectacular/plugins/webmock.rb