Permalink
Browse files

Replace before block with `subject`.

  • Loading branch information...
1 parent c413173 commit 1d394f3179a4d4523054d060d6d1577a9f7ca094 @weppos committed Sep 13, 2012
Showing 697 changed files with 13,662 additions and 13,662 deletions.
@@ -15,16 +15,16 @@
describe Whois::Record::Parser::JobswhoisVerisignGrsCom, "property_nameserver_no_nameserver.expected" do
- before(:each) do
+ subject do
file = fixture("responses", "jobswhois.verisign-grs.com/property_nameserver_no_nameserver.txt")
part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
+ described_class.new(part)
end
describe "#nameservers" do
it do
- @parser.nameservers.should be_a(Array)
- @parser.nameservers.should == []
+ subject.nameservers.should be_a(Array)
+ subject.nameservers.should == []
end
end
end
@@ -15,76 +15,76 @@
describe Whois::Record::Parser::JobswhoisVerisignGrsCom, "status_available.expected" do
- before(:each) do
+ subject do
file = fixture("responses", "jobswhois.verisign-grs.com/status_available.txt")
part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
+ described_class.new(part)
end
describe "#disclaimer" do
it do
- @parser.disclaimer.should == "TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time."
+ subject.disclaimer.should == "TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time."
end
end
describe "#domain" do
it do
- @parser.domain.should == "u34jedzcq.jobs"
+ subject.domain.should == "u34jedzcq.jobs"
end
end
describe "#domain_id" do
it do
- lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.domain_id }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#referral_whois" do
it do
- @parser.referral_whois.should == nil
+ subject.referral_whois.should == nil
end
end
describe "#referral_url" do
it do
- @parser.referral_url.should == nil
+ subject.referral_url.should == nil
end
end
describe "#status" do
it do
- @parser.status.should == nil
+ subject.status.should == nil
end
end
describe "#available?" do
it do
- @parser.available?.should == true
+ subject.available?.should == true
end
end
describe "#registered?" do
it do
- @parser.registered?.should == false
+ subject.registered?.should == false
end
end
describe "#created_on" do
it do
- @parser.created_on.should == nil
+ subject.created_on.should == nil
end
end
describe "#updated_on" do
it do
- @parser.updated_on.should == nil
+ subject.updated_on.should == nil
end
end
describe "#expires_on" do
it do
- @parser.expires_on.should == nil
+ subject.expires_on.should == nil
end
end
describe "#registrar" do
it do
- @parser.registrar.should == nil
+ subject.registrar.should == nil
end
end
describe "#nameservers" do
it do
- @parser.nameservers.should be_a(Array)
- @parser.nameservers.should == []
+ subject.nameservers.should be_a(Array)
+ subject.nameservers.should == []
end
end
end
@@ -15,87 +15,87 @@
describe Whois::Record::Parser::JobswhoisVerisignGrsCom, "status_registered.expected" do
- before(:each) do
+ subject do
file = fixture("responses", "jobswhois.verisign-grs.com/status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
+ described_class.new(part)
end
describe "#disclaimer" do
it do
- @parser.disclaimer.should == "TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time."
+ subject.disclaimer.should == "TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated except as reasonably necessary to register domain names or modify existing registrations; the Data in VeriSign's (\"VeriSign\") Whois database is provided by VeriSign for information purposes only, and to assist persons in obtaining information about or related to a domain name registration record. VeriSign does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to VeriSign (or its computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited without the prior written consent of VeriSign. You agree not to use electronic processes that are automated and high-volume to access or query the Whois database except as reasonably necessary to register domain names or modify existing registrations. VeriSign reserves the right to restrict your access to the Whois database in its sole discretion to ensure operational stability. VeriSign may restrict or terminate your access to the Whois database for failure to abide by these terms of use. VeriSign reserves the right to modify these terms at any time."
end
end
describe "#domain" do
it do
- @parser.domain.should == "goto.jobs"
+ subject.domain.should == "goto.jobs"
end
end
describe "#domain_id" do
it do
- lambda { @parser.domain_id }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.domain_id }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#referral_whois" do
it do
- @parser.referral_whois.should == "whois.encirca.com"
+ subject.referral_whois.should == "whois.encirca.com"
end
end
describe "#referral_url" do
it do
- @parser.referral_url.should == "http://www.encirca.com"
+ subject.referral_url.should == "http://www.encirca.com"
end
end
describe "#status" do
it do
- @parser.status.should == "ACTIVE"
+ subject.status.should == "ACTIVE"
end
end
describe "#available?" do
it do
- @parser.available?.should == false
+ subject.available?.should == false
end
end
describe "#registered?" do
it do
- @parser.registered?.should == true
+ subject.registered?.should == true
end
end
describe "#created_on" do
it do
- @parser.created_on.should be_a(Time)
- @parser.created_on.should == Time.parse("2006-02-21")
+ subject.created_on.should be_a(Time)
+ subject.created_on.should == Time.parse("2006-02-21")
end
end
describe "#updated_on" do
it do
- @parser.updated_on.should be_a(Time)
- @parser.updated_on.should == Time.parse("2009-02-20")
+ subject.updated_on.should be_a(Time)
+ subject.updated_on.should == Time.parse("2009-02-20")
end
end
describe "#expires_on" do
it do
- @parser.expires_on.should be_a(Time)
- @parser.expires_on.should == Time.parse("2010-02-21")
+ subject.expires_on.should be_a(Time)
+ subject.expires_on.should == Time.parse("2010-02-21")
end
end
describe "#registrar" do
it do
- @parser.registrar.should be_a(Whois::Record::Registrar)
- @parser.registrar.id.should == nil
- @parser.registrar.name.should == "ENCIRCA, INC"
- @parser.registrar.organization.should == "ENCIRCA, INC"
- @parser.registrar.url.should == "http://www.encirca.com"
+ subject.registrar.should be_a(Whois::Record::Registrar)
+ subject.registrar.id.should == nil
+ subject.registrar.name.should == "ENCIRCA, INC"
+ subject.registrar.organization.should == "ENCIRCA, INC"
+ subject.registrar.url.should == "http://www.encirca.com"
end
end
describe "#nameservers" do
it do
- @parser.nameservers.should be_a(Array)
- @parser.nameservers.should have(2).items
- @parser.nameservers[0].should be_a(Whois::Record::Nameserver)
- @parser.nameservers[0].name.should == "ns2.registry.jobs"
- @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
- @parser.nameservers[1].name.should == "ns1.registry.jobs"
+ subject.nameservers.should be_a(Array)
+ subject.nameservers.should have(2).items
+ subject.nameservers[0].should be_a(Whois::Record::Nameserver)
+ subject.nameservers[0].name.should == "ns2.registry.jobs"
+ subject.nameservers[1].should be_a(Whois::Record::Nameserver)
+ subject.nameservers[1].name.should == "ns1.registry.jobs"
end
end
end
@@ -15,46 +15,46 @@
describe Whois::Record::Parser::KeroYachayPe, "status_available.expected" do
- before(:each) do
+ subject do
file = fixture("responses", "kero.yachay.pe/status_available.txt")
part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
+ described_class.new(part)
end
describe "#status" do
it do
- @parser.status.should == :available
+ subject.status.should == :available
end
end
describe "#available?" do
it do
- @parser.available?.should == true
+ subject.available?.should == true
end
end
describe "#registered?" do
it do
- @parser.registered?.should == false
+ subject.registered?.should == false
end
end
describe "#created_on" do
it do
- lambda { @parser.created_on }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.created_on }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#updated_on" do
it do
- lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.updated_on }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#expires_on" do
it do
- lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.expires_on }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#nameservers" do
it do
- @parser.nameservers.should be_a(Array)
- @parser.nameservers.should == []
+ subject.nameservers.should be_a(Array)
+ subject.nameservers.should == []
end
end
end
@@ -15,47 +15,47 @@
describe Whois::Record::Parser::KeroYachayPe, "status_inactive.expected" do
- before(:each) do
+ subject do
file = fixture("responses", "kero.yachay.pe/status_inactive.txt")
part = Whois::Record::Part.new(:body => File.read(file))
- @parser = klass.new(part)
+ described_class.new(part)
end
describe "#status" do
it do
- @parser.status.should == :inactive
+ subject.status.should == :inactive
end
end
describe "#available?" do
it do
- @parser.available?.should == false
+ subject.available?.should == false
end
end
describe "#registered?" do
it do
- @parser.registered?.should == true
+ subject.registered?.should == true
end
end
describe "#created_on" do
it do
- lambda { @parser.created_on }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.created_on }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#updated_on" do
it do
- lambda { @parser.updated_on }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.updated_on }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#expires_on" do
it do
- lambda { @parser.expires_on }.should raise_error(Whois::PropertyNotSupported)
+ lambda { subject.expires_on }.should raise_error(Whois::PropertyNotSupported)
end
end
describe "#nameservers" do
it do
- @parser.nameservers.should be_a(Array)
- @parser.nameservers.should have(0).items
- @parser.nameservers.should == []
+ subject.nameservers.should be_a(Array)
+ subject.nameservers.should have(0).items
+ subject.nameservers.should == []
end
end
end
Oops, something went wrong.

0 comments on commit 1d394f3

Please sign in to comment.