spec/lib/authorities/geonames_spec.rb in qa-0.10.1 vs spec/lib/authorities/geonames_spec.rb in qa-0.10.2

- old
+ new

@@ -1,9 +1,8 @@ require 'spec_helper' describe Qa::Authorities::Geonames do - before do described_class.username = 'dummy' end let(:authority) { described_class.new } @@ -19,12 +18,12 @@ end describe "#search" do context "authorities" do before do - stub_request(:get, /api\.geonames\.org.*/). - to_return(:body => webmock_fixture("geonames-response.json"), status: 200) + stub_request(:get, /api\.geonames\.org.*/) + .to_return(body: webmock_fixture("geonames-response.json"), status: 200) end subject { authority.search('whatever') } context "with default label" do @@ -75,16 +74,16 @@ end describe "#find" do context "using a subject id" do before do - stub_request(:get, "http://www.geonames.org/getJSON?geonameId=2088122&username=dummy"). - to_return(status: 200, body: webmock_fixture("geonames-find-response.json")) + stub_request(:get, "http://www.geonames.org/getJSON?geonameId=2088122&username=dummy") + .to_return(status: 200, body: webmock_fixture("geonames-find-response.json")) end subject { authority.find("2088122") } it "returns the complete record for a given subject" do - expect(subject['geonameId']).to eq 2088122 + expect(subject['geonameId']).to eq 2_088_122 expect(subject['name']).to eq "Port Moresby" end end end end