Sha256: d59c75b65cf7fea3c16f80f1b767252cf148cb70811c1ea5eafaa281776f7793

Contents?: true

Size: 641 Bytes

Versions: 18

Compression:

Stored size: 641 Bytes

Contents

require "spec_helper"

describe Whois::Server::Adapters::NotImplemented do

  before(:each) do
    @definition = [:ipv6, "2001:0000::/32", "teredo", { :adapter => Whois::Server::Adapters::NotImplemented }]
  end


  describe "#query" do
    it "raises Whois::ServerNotImplemented" do
      lambda do
        klass.new(*@definition).query("example.test")
      end.should raise_error(Whois::ServerNotImplemented)
    end

    it "customizes the error message according to the host" do
      lambda do
        klass.new(*@definition).query("example.test")
      end.should raise_error(Whois::ServerNotImplemented, /teredo/)
    end
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

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