spec/dnsimple/extended_attributes_spec.rb in dnsimple-ruby-1.5.3 vs spec/dnsimple/extended_attributes_spec.rb in dnsimple-ruby-1.5.4
- old
+ new
@@ -9,12 +9,12 @@
end
it "builds the correct request" do
described_class.find("com")
- WebMock.should have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/extended_attributes/com").
- with(:headers => { 'Accept' => 'application/json' })
+ expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/extended_attributes/com").
+ with(:headers => { 'Accept' => 'application/json' })
end
context "when the TLD has no attributes" do
before do
stub_request(:get, %r[/v1/extended_attributes/com]).
@@ -36,18 +36,18 @@
it "returns the attributes" do
result = described_class.find("ca")
expect(result).to be_a(Array)
- expect(result).to have(5).attributes
+ expect(result.size).to eq(5)
attribute = result[0]
expect(attribute).to be_a(described_class)
expect(attribute.name).to eq("cira_legal_type")
expect(attribute.description).to eq("Legal type of registrant contact")
- expect(attribute.required).to be_true
+ expect(attribute.required).to be_truthy
expect(attribute.options).to be_a(Array)
- expect(attribute.options).to have(18).options
+ expect(attribute.options.size).to eq(18)
end
end
end
end