Skip to content

Commit

Permalink
Fix deprecated Whois::Record::Part.new usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed May 28, 2012
1 parent 28d8f09 commit 8c18f67
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions spec/whois/record/part_spec.rb
Expand Up @@ -22,12 +22,12 @@
end.should_not raise_error
end

it "initializes a new instance from given params" do
i = klass.new("This is a WHOIS record.", "whois.example.test")
# it "initializes a new instance from given params" do
# i = klass.new("This is a WHOIS record.", "whois.example.test")

i.body.should == "This is a WHOIS record."
i.host.should == "whois.example.test"
end
# i.body.should == "This is a WHOIS record."
# i.host.should == "whois.example.test"
# end

it "initializes a new instance from given hash" do
i = klass.new(:body => "This is a WHOIS record.", :host => "whois.example.test")
Expand Down
4 changes: 2 additions & 2 deletions spec/whois/server/adapters/afilias_spec.rb
Expand Up @@ -18,7 +18,7 @@
record = @server.query("domain.test")
record.to_s.should == expected
record.parts.should have(1).part
record.parts.should == [Whois::Record::Part.new(response, "whois.afilias-grs.info")]
record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.afilias-grs.info")]
end
end

Expand All @@ -33,7 +33,7 @@
record = @server.query("domain.test")
record.to_s.should == expected
record.parts.should have(2).parts
record.parts.should == [Whois::Record::Part.new(referral, "whois.afilias-grs.info"), Whois::Record::Part.new(response, "whois.belizenic.bz")]
record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.afilias-grs.info"), Whois::Record::Part.new(:body => response, :host => "whois.belizenic.bz")]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/whois/server/adapters/formatted_spec.rb
Expand Up @@ -16,7 +16,7 @@

record = server.query("domain.de")
record.to_s.should == expected
record.parts.should == [Whois::Record::Part.new(response, "whois.denic.de")]
record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.denic.de")]
end

context "without format option" do
Expand Down
4 changes: 2 additions & 2 deletions spec/whois/server/adapters/pir_spec.rb
Expand Up @@ -18,7 +18,7 @@
record = @server.query("domain.test")
record.to_s.should == expected
record.parts.should have(1).part
record.parts.should == [Whois::Record::Part.new(response, "whois.publicinterestregistry.net")]
record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.publicinterestregistry.net")]
end
end

Expand All @@ -33,7 +33,7 @@
record = @server.query("domain.test")
record.to_s.should == expected
record.parts.should have(2).parts
record.parts.should == [Whois::Record::Part.new(referral, "whois.publicinterestregistry.net"), Whois::Record::Part.new(response, "whois.iana.org")]
record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.publicinterestregistry.net"), Whois::Record::Part.new(:body => response, :host => "whois.iana.org")]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/whois/server/adapters/standard_spec.rb
Expand Up @@ -16,7 +16,7 @@

record = server.query("domain.test")
record.to_s.should == expected
record.parts.should == [Whois::Record::Part.new(response, "whois.test")]
record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.test")]
end

context "with port option" do
Expand Down
4 changes: 2 additions & 2 deletions spec/whois/server/adapters/verisign_spec.rb
Expand Up @@ -18,7 +18,7 @@
record = @server.query("domain.test")
record.to_s.should == expected
record.parts.should have(1).part
record.parts.should == [Whois::Record::Part.new(response, "whois.test")]
record.parts.should == [Whois::Record::Part.new(:body => response, :host => "whois.test")]
end
end

Expand All @@ -33,7 +33,7 @@
record = @server.query("domain.test")
record.to_s.should == expected
record.parts.should have(2).parts
record.parts.should == [Whois::Record::Part.new(referral, "whois.test"), Whois::Record::Part.new(response, "whois.markmonitor.com")]
record.parts.should == [Whois::Record::Part.new(:body => referral, :host => "whois.test"), Whois::Record::Part.new(:body => response, :host => "whois.markmonitor.com")]
end

it "extracts the closest referral when multiple referrals" do
Expand Down

0 comments on commit 8c18f67

Please sign in to comment.