<commit_before># encoding: utf-8

# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
#   /spec/fixtures/responses/whois.yoursrs.com/status_registered.expected
#
# and regenerate the tests with the following rake task
#
#   $ rake spec:generate
#

require 'spec_helper'
require 'whois/record/parser/whois.yoursrs.com.rb'

describe Whois::Record::Parser::WhoisYoursrsCom, "status_registered.expected" do

  subject do
    file = fixture("responses", "whois.yoursrs.com/status_registered.txt")
    part = Whois::Record::Part.new(body: File.read(file))
    described_class.new(part)
  end

  describe "#domain" do
    it do
      expect(subject.domain).to eq("yoursrs.com")
    end
  end
  describe "#domain_id" do
    it do
      expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported)
    end
  end
  describe "#status" do
    it do
      expect(subject.status).to eq(["OK"])
    end
  end
  describe "#available?" do
    it do
      expect(subject.available?).to eq(false)
    end
  end
  describe "#registered?" do
    it do
      expect(subject.registered?).to eq(true)
    end
  end
  describe "#created_on" do
    it do
      expect(subject.created_on).to be_a(Time)
      expect(subject.created_on).to eq(Time.parse("2003-11-24 09:40:55"))
    end
  end
  describe "#updated_on" do
    it do
      expect(subject.updated_on).to be_a(Time)
      expect(subject.updated_on).to eq(Time.parse("2014-01-22 14:04:50"))
    end
  end
  describe "#expires_on" do
    it do
      expect(subject.expires_on).to be_a(Time)
      expect(subject.expires_on).to eq(Time.parse("2014-11-24 09:40:55"))
    end
  end
  describe "#registrar" do
    it do
      expect(subject.registrar).to be_a(Whois::Record::Registrar)
      expect(subject.registrar.id).to eq(nil)
      expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.")
      expect(subject.registrar.organization).to eq(nil)
      expect(subject.registrar.url).to eq(nil)
    end
  end
  describe "#registrant_contacts" do
    it do
      expect(subject.registrant_contacts).to be_a(Array)
      expect(subject.registrant_contacts).to have(1).items
      expect(subject.registrant_contacts[0]).to be_a(Whois::Record::Contact)
      expect(subject.registrant_contacts[0].type).to eq(Whois::Record::Contact::TYPE_REGISTRANT)
      expect(subject.registrant_contacts[0].id).to eq("realtimeregister")
      expect(subject.registrant_contacts[0].name).to eq("<NAME>")
      expect(subject.registrant_contacts[0].organization).to eq("Realtime Register B.V.")
      expect(subject.registrant_contacts[0].address).to eq("Ceintuurbaan 32a")
      expect(subject.registrant_contacts[0].city).to eq("Zwolle")
      expect(subject.registrant_contacts[0].zip).to eq("8024AA")
      expect(subject.registrant_contacts[0].state).to eq("Overijssel")
      expect(subject.registrant_contacts[0].country_code).to eq("NL")
      expect(subject.registrant_contacts[0].phone).to eq("+31.384530752")
      expect(subject.registrant_contacts[0].fax).to eq("+31.384540122")
      expect(subject.registrant_contacts[0].email).to eq("<EMAIL>")
    end
  end
  describe "#admin_contacts" do
    it do
      expect(subject.admin_contacts).to be_a(Array)
      expect(subject.admin_contacts).to have(1).items
      expect(subject.admin_contacts[0]).to be_a(Whois::Record::Contact)
      expect(subject.admin_contacts[0].type).to eq(Whois::Record::Contact::TYPE_ADMINISTRATIVE)
      expect(subject.admin_contacts[0].id).to eq("realtimeregister")
      expect(subject.admin_contacts[0].name).to eq("<NAME>")
      expect(subject.admin_contacts[0].organization).to eq("Realtime Register B.V.")
      expect(subject.admin_contacts[0].address).to eq("Ceintuurbaan 32a")
      expect(subject.admin_contacts[0].city).to eq("Zwolle")
      expect(subject.admin_contacts[0].zip).to eq("8024AA")
      expect(subject.admin_contacts[0].state).to eq("Overijssel")
      expect(subject.admin_contacts[0].country_code).to eq("NL")
      expect(subject.admin_contacts[0].phone).to eq("+31.384530752")
      expect(subject.admin_contacts[0].fax).to eq("+31.384540122")
      expect(subject.admin_contacts[0].email).to eq("<EMAIL>")
    end
  end
  describe "#technical_contacts" do
    it do
      expect(subject.technical_contacts).to be_a(Array)
      expect(subject.technical_contacts).to have(1).items
      expect(subject.technical_contacts[0]).to be_a(Whois::Record::Contact)
      expect(subject.technical_contacts[0].type).to eq(Whois::Record::Contact::TYPE_TECHNICAL)
      expect(subject.technical_contacts[0].id).to eq("realtimeregister")
      expect(subject.technical_contacts[0].name).to eq("<NAME>")
      expect(subject.technical_contacts[0].organization).to eq("Realtime Register B.V.")
      expect(subject.technical_contacts[0].address).to eq("Ceintuurbaan 32a")
      expect(subject.technical_contacts[0].city).to eq("Zwolle")
      expect(subject.technical_contacts[0].zip).to eq("8024AA")
      expect(subject.technical_contacts[0].state).to eq("Overijssel")
      expect(subject.technical_contacts[0].country_code).to eq("NL")
      expect(subject.technical_contacts[0].phone).to eq("+31.384530752")
      expect(subject.technical_contacts[0].fax).to eq("+31.384540122")
      expect(subject.technical_contacts[0].email).to eq("<EMAIL>")
    end
  end
  describe "#nameservers" do
    it do
      expect(subject.nameservers).to be_a(Array)
      expect(subject.nameservers).to have(2).items
      expect(subject.nameservers[0]).to be_a(Whois::Record::Nameserver)
      expect(subject.nameservers[0].name).to eq("ns1.yoursrs.com")
      expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
      expect(subject.nameservers[1].name).to eq("ns2.yoursrs.com")
    end
  end
  describe "blank Last Updated Date: property" do
    subject do
      file = fixture("responses", "whois.yoursrs.com/status_registered_with_no_last_updated.txt")
      part = Whois::Record::Part.new(body: File.read(file))
      described_class.new(part)
    end

    describe "#updated_on" do
      it do
        expect(subject.updated_on).to eq(nil)
      end
    end
  end
end<commit_msg>Condense spec syntax.<commit_after># encoding: utf-8

# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
#   /spec/fixtures/responses/whois.yoursrs.com/status_registered.expected
#
# and regenerate the tests with the following rake task
#
#   $ rake spec:generate
#

require 'spec_helper'
require 'whois/record/parser/whois.yoursrs.com.rb'

describe Whois::Record::Parser::WhoisYoursrsCom, "status_registered.expected" do

  subject do
    file = fixture("responses", "whois.yoursrs.com/status_registered.txt")
    part = Whois::Record::Part.new(body: File.read(file))
    described_class.new(part)
  end

  describe "#domain" do
    it do
      expect(subject.domain).to eq("yoursrs.com")
    end
  end
  describe "#domain_id" do
    it do
      expect { subject.domain_id }.to raise_error(Whois::AttributeNotSupported)
    end
  end
  describe "#status" do
    it do
      expect(subject.status).to eq(["OK"])
    end
  end
  describe "#available?" do
    it do
      expect(subject.available?).to eq(false)
    end
  end
  describe "#registered?" do
    it do
      expect(subject.registered?).to eq(true)
    end
  end
  describe "#created_on" do
    it do
      expect(subject.created_on).to be_a(Time)
      expect(subject.created_on).to eq(Time.parse("2003-11-24 09:40:55"))
    end
  end
  describe "#updated_on" do
    it do
      expect(subject.updated_on).to be_a(Time)
      expect(subject.updated_on).to eq(Time.parse("2014-01-22 14:04:50"))
    end
  end
  describe "#expires_on" do
    it do
      expect(subject.expires_on).to be_a(Time)
      expect(subject.expires_on).to eq(Time.parse("2014-11-24 09:40:55"))
    end
  end
  describe "#registrar" do
    it do
      expect(subject.registrar).to be_a(Whois::Record::Registrar)
      expect(subject.registrar.id).to eq(nil)
      expect(subject.registrar.name).to eq("REALTIME REGISTER B.V.")
      expect(subject.registrar.organization).to eq(nil)
      expect(subject.registrar.url).to eq(nil)
    end
  end
  describe "#registrant_contacts" do
    it do
      expect(subject.registrant_contacts).to be_a(Array)
      expect(subject.registrant_contacts).to have(1).items
      expect(subject.registrant_contacts[0]).to be_a(Whois::Record::Contact)
      expect(subject.registrant_contacts[0].type).to eq(Whois::Record::Contact::TYPE_REGISTRANT)
      expect(subject.registrant_contacts[0].id).to eq("realtimeregister")
      expect(subject.registrant_contacts[0].name).to eq("<NAME>")
      expect(subject.registrant_contacts[0].organization).to eq("Realtime Register B.V.")
      expect(subject.registrant_contacts[0].address).to eq("Ceintuurbaan 32a")
      expect(subject.registrant_contacts[0].city).to eq("Zwolle")
      expect(subject.registrant_contacts[0].zip).to eq("8024AA")
      expect(subject.registrant_contacts[0].state).to eq("Overijssel")
      expect(subject.registrant_contacts[0].country_code).to eq("NL")
      expect(subject.registrant_contacts[0].phone).to eq("+31.384530752")
      expect(subject.registrant_contacts[0].fax).to eq("+31.384540122")
      expect(subject.registrant_contacts[0].email).to eq("<EMAIL>")
    end
  end
  describe "#admin_contacts" do
    it do
      expect(subject.admin_contacts).to be_a(Array)
      expect(subject.admin_contacts).to have(1).items
      expect(subject.admin_contacts[0]).to be_a(Whois::Record::Contact)
      expect(subject.admin_contacts[0].type).to eq(Whois::Record::Contact::TYPE_ADMINISTRATIVE)
      expect(subject.admin_contacts[0].id).to eq("realtimeregister")
      expect(subject.admin_contacts[0].name).to eq("<NAME>")
      expect(subject.admin_contacts[0].organization).to eq("Realtime Register B.V.")
      expect(subject.admin_contacts[0].address).to eq("Ceintuurbaan 32a")
      expect(subject.admin_contacts[0].city).to eq("Zwolle")
      expect(subject.admin_contacts[0].zip).to eq("8024AA")
      expect(subject.admin_contacts[0].state).to eq("Overijssel")
      expect(subject.admin_contacts[0].country_code).to eq("NL")
      expect(subject.admin_contacts[0].phone).to eq("+31.384530752")
      expect(subject.admin_contacts[0].fax).to eq("+31.384540122")
      expect(subject.admin_contacts[0].email).to eq("<EMAIL>")
    end
  end
  describe "#technical_contacts" do
    it do
      expect(subject.technical_contacts).to be_a(Array)
      expect(subject.technical_contacts).to have(1).items
      expect(subject.technical_contacts[0]).to be_a(Whois::Record::Contact)
      expect(subject.technical_contacts[0].type).to eq(Whois::Record::Contact::TYPE_TECHNICAL)
      expect(subject.technical_contacts[0].id).to eq("realtimeregister")
      expect(subject.technical_contacts[0].name).to eq("<NAME>")
      expect(subject.technical_contacts[0].organization).to eq("Realtime Register B.V.")
      expect(subject.technical_contacts[0].address).to eq("Ceintuurbaan 32a")
      expect(subject.technical_contacts[0].city).to eq("Zwolle")
      expect(subject.technical_contacts[0].zip).to eq("8024AA")
      expect(subject.technical_contacts[0].state).to eq("Overijssel")
      expect(subject.technical_contacts[0].country_code).to eq("NL")
      expect(subject.technical_contacts[0].phone).to eq("+31.384530752")
      expect(subject.technical_contacts[0].fax).to eq("+31.384540122")
      expect(subject.technical_contacts[0].email).to eq("<EMAIL>")
    end
  end
  describe "#nameservers" do
    it do
      expect(subject.nameservers).to be_a(Array)
      expect(subject.nameservers).to have(2).items
      expect(subject.nameservers[0]).to be_a(Whois::Record::Nameserver)
      expect(subject.nameservers[0].name).to eq("ns1.yoursrs.com")
      expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
      expect(subject.nameservers[1].name).to eq("ns2.yoursrs.com")
    end
  end
  describe "blank Last Updated Date: property" do
    subject do
      file = fixture("responses", "whois.yoursrs.com/status_registered_with_no_last_updated.txt")
      part = Whois::Record::Part.new(body: File.read(file))
      described_class.new(part)
    end

    describe "#updated_on" do
      its(:updated_on) { should be_nil }
    end
  end
end
{'fraction_non_alphanumeric': 0.14208181449979748, 'fraction_numerical': 0.028513568246253545, 'mean_word_length': 4.089035449299258, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '142549', 'n_tokens_mistral': 4460, 'n_tokens_neox': 4227, 'n_words': 641}