Sha256: aae27a6f2d3d0302ce871409a07158756aceb128537f85efe7c9ebe9300a0620

Contents?: true

Size: 519 Bytes

Versions: 3

Compression:

Stored size: 519 Bytes

Contents

require 'spec_helper'

describe Whois::WebInterfaceError do

  describe "#initialize" do
    it "sets the URL" do
      expect(described_class.new("http://example.com").url).to eq("http://example.com")
    end

    it "requires the URL argument" do
      expect {
        described_class.new
      }.to raise_error(ArgumentError)
    end
  end

  describe "#message" do
    it "interpolates the URL" do
      expect(described_class.new("http://example.com").message).to match(%r{http://example.com})
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
whois-5.0.1 spec/whois/errors_spec.rb
whois-5.0.0 spec/whois/errors_spec.rb
whois-4.1.0 spec/whois/errors_spec.rb