spec/lib/authorities_loc_spec.rb in qa-0.0.1 vs spec/lib/authorities_loc_spec.rb in qa-0.0.2

- old
+ new

@@ -4,11 +4,12 @@ before :all do stub_request(:get, "http://id.loc.gov/search/?format=json&q=haw*&q=cs:http://id.loc.gov/vocabulary/geographicAreas"). with(:headers => {'Accept'=>'application/json'}). to_return(:body => webmock_fixture("loc-response.txt"), :status => 200) - @authority = Qa::Authorities::Loc.new("haw*", "geographicAreas") + @authority = Qa::Authorities::Loc.new + @authority.search("haw*", "geographicAreas") end it "should instantiate with a query and return data" do expect(@authority).not_to be_nil @authority.raw_response.to_s.should include("id") @@ -26,10 +27,10 @@ expect(url).to eq("") end it "should return JSON" do @authority.should_not be_nil - json = @authority.parse_authority_response + json = @authority.parse_authority_response(@authority.raw_response) expect(json).not_to be_empty end -end \ No newline at end of file +end