Sha256: 447bbaaa88305faa1b31d853b1e75a4ee40de89b6a170e5da80dba94db29f2d8

Contents?: true

Size: 299 Bytes

Versions: 15

Compression:

Stored size: 299 Bytes

Contents

module ResolvHelpers
  def stub_resolv(name, address)
    dns = double
    allow(::Resolv::DNS).to receive(:new).and_return(dns)
    allow(dns).to receive(:each_address).
      with(name).and_yield(Resolv::IPv4.create(address))
  end
end

RSpec.configure do |conf|
  conf.include(ResolvHelpers)
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
codeclimate-services-1.11.4 spec/support/resolv_helpers.rb
codeclimate-services-1.11.3 spec/support/resolv_helpers.rb
codeclimate-services-1.11.2 spec/support/resolv_helpers.rb
codeclimate-services-1.11.1 spec/support/resolv_helpers.rb
codeclimate-services-1.11.0 spec/support/resolv_helpers.rb
codeclimate-services-1.10.1 spec/support/resolv_helpers.rb
codeclimate-services-1.10.0 spec/support/resolv_helpers.rb
codeclimate-services-1.9.8 spec/support/resolv_helpers.rb
codeclimate-services-1.9.7 spec/support/resolv_helpers.rb
codeclimate-services-1.9.6 spec/support/resolv_helpers.rb
codeclimate-services-1.9.5 spec/support/resolv_helpers.rb
codeclimate-services-1.9.4 spec/support/resolv_helpers.rb
codeclimate-services-1.9.3 spec/support/resolv_helpers.rb
codeclimate-services-1.9.2 spec/support/resolv_helpers.rb
codeclimate-services-1.9.1 spec/support/resolv_helpers.rb