From 8c18f67a9ba1f37bb5c8562f5b3f34491cb99401 Mon Sep 17 00:00:00 2001 From: Simone Carletti Date: Mon, 28 May 2012 23:53:18 +0200 Subject: [PATCH] Fix deprecated Whois::Record::Part.new usage. --- spec/whois/record/part_spec.rb | 10 +++++----- spec/whois/server/adapters/afilias_spec.rb | 4 ++-- spec/whois/server/adapters/formatted_spec.rb | 2 +- spec/whois/server/adapters/pir_spec.rb | 4 ++-- spec/whois/server/adapters/standard_spec.rb | 2 +- spec/whois/server/adapters/verisign_spec.rb | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spec/whois/record/part_spec.rb b/spec/whois/record/part_spec.rb index f51c11b48..97d6ebbb1 100644 --- a/spec/whois/record/part_spec.rb +++ b/spec/whois/record/part_spec.rb @@ -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") diff --git a/spec/whois/server/adapters/afilias_spec.rb b/spec/whois/server/adapters/afilias_spec.rb index ad2e760ed..e17e5bf46 100644 --- a/spec/whois/server/adapters/afilias_spec.rb +++ b/spec/whois/server/adapters/afilias_spec.rb @@ -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 @@ -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 diff --git a/spec/whois/server/adapters/formatted_spec.rb b/spec/whois/server/adapters/formatted_spec.rb index 17f55dedd..161ba9cc2 100644 --- a/spec/whois/server/adapters/formatted_spec.rb +++ b/spec/whois/server/adapters/formatted_spec.rb @@ -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 diff --git a/spec/whois/server/adapters/pir_spec.rb b/spec/whois/server/adapters/pir_spec.rb index 1aaa4b96f..fed493d0f 100644 --- a/spec/whois/server/adapters/pir_spec.rb +++ b/spec/whois/server/adapters/pir_spec.rb @@ -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 @@ -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 diff --git a/spec/whois/server/adapters/standard_spec.rb b/spec/whois/server/adapters/standard_spec.rb index d7656cd63..bac370037 100644 --- a/spec/whois/server/adapters/standard_spec.rb +++ b/spec/whois/server/adapters/standard_spec.rb @@ -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 diff --git a/spec/whois/server/adapters/verisign_spec.rb b/spec/whois/server/adapters/verisign_spec.rb index ec1079215..585266ce4 100644 --- a/spec/whois/server/adapters/verisign_spec.rb +++ b/spec/whois/server/adapters/verisign_spec.rb @@ -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 @@ -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