spec/base_spec.rb in hoverbird-ny-times-congress-1.1.0 vs spec/base_spec.rb in hoverbird-ny-times-congress-1.2.0
- old
+ new
@@ -8,11 +8,11 @@
@url = NYTimes::Congress::Base.build_request_url("members/A000014.json", {"api-key" => "does-not-matter"} )
@expected_url = URI.parse "http://api.nytimes.com/svc/politics/v2/us/legislative/congress/members/A000014.json?api-key=does-not-matter"
end
it "returns a string matching the expected URL" do
- url.should eql expected_url
+ url.should eql(expected_url)
end
end
describe "#invoke" do
@@ -20,11 +20,11 @@
def example_data
member_response
end
it "makes a call to a given url and parses the returned JSON into a response hash" do
- FakeWeb.register_uri(api_url_for('congress/111/senate/members.json'), :string => example_data)
- @response = NYTimes::Congress::Base.invoke("congress/111/senate/members.json")
+ FakeWeb.register_uri(api_url_for('111/senate/members.json'), :string => example_data)
+ @response = NYTimes::Congress::Base.invoke("111/senate/members.json")
response.should == JSON.parse(example_data)
end
end
end