Sha256: dde5dc2f97691381ade852ff4c2ccb6aa4ad0c87ce183488be4c052eedd37c3a

Contents?: true

Size: 630 Bytes

Versions: 18

Compression:

Stored size: 630 Bytes

Contents

require "spec_helper"

describe Whois::Server::Adapters::None do

  describe "#query" do
    it "raises Whois::NoInterfaceError" do
      lambda do
        klass.new(:tld, ".test", nil).query("example.test")
      end.should raise_error(Whois::NoInterfaceError)
    end

    it "customizes the error message according to the type" do
      lambda do
        klass.new(:tld, ".test", nil).query("example.test")
      end.should raise_error(Whois::NoInterfaceError, /tld/)
      lambda do
        klass.new(:ipv4, "127.0.0.1", nil).query("127.0.0.1")
      end.should raise_error(Whois::NoInterfaceError, /ipv4/)
    end
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
whois-2.6.3 spec/whois/server/adapters/none_spec.rb
whois-2.6.2 spec/whois/server/adapters/none_spec.rb
whois-2.6.1 spec/whois/server/adapters/none_spec.rb
whois-2.6.0 spec/whois/server/adapters/none_spec.rb
whois-2.5.1 spec/whois/server/adapters/none_spec.rb
whois-2.5.0 spec/whois/server/adapters/none_spec.rb
whois-2.4.0 spec/whois/server/adapters/none_spec.rb
whois-2.3.0 spec/whois/server/adapters/none_spec.rb
whois-2.2.0 spec/whois/server/adapters/none_spec.rb
whois-2.1.0 spec/whois/server/adapters/none_spec.rb
whois-2.0.7 spec/whois/server/adapters/none_spec.rb
whois-2.0.6 spec/whois/server/adapters/none_spec.rb
whois-2.0.5 spec/whois/server/adapters/none_spec.rb
whois-2.0.4 spec/whois/server/adapters/none_spec.rb
whois-2.0.3 spec/whois/server/adapters/none_spec.rb
whois-2.0.2 spec/whois/server/adapters/none_spec.rb
whois-2.0.1 spec/whois/server/adapters/none_spec.rb
whois-2.0.0 spec/whois/server/adapters/none_spec.rb