Sha256: c402d51026bba38416acc3b866c9915d3c330a208f15e2f840233d4f8663249e

Contents?: true

Size: 376 Bytes

Versions: 5

Compression:

Stored size: 376 Bytes

Contents

require 'socket'

describe "Resolv#getaddresses" do
  before(:all) do
    require 'resolv'
  end

  it "resolves localhost" do
    res = Resolv.new([Resolv::Hosts.new])

    addresses = nil

    lambda {
      addresses = res.getaddresses("localhost")
    }.should_not raise_error(Resolv::ResolvError)

    addresses.should_not == nil
    addresses.size.should > 0
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubysl-resolv-2.1.2 spec/get_addresses_spec.rb
rubysl-resolv-2.1.1 spec/get_addresses_spec.rb
rubysl-resolv-2.1.0 spec/get_addresses_spec.rb
rubysl-resolv-1.0.0 spec/get_addresses_spec.rb
rubysl-resolv-2.0.0 spec/get_addresses_spec.rb