spec/rapidash/http_client_spec.rb in rapidash-0.0.2 vs spec/rapidash/http_client_spec.rb in rapidash-0.0.3

- old
+ new

@@ -38,9 +38,15 @@ before(:each) do subject.site = "http://example.com" Rapidash::Response.should_receive(:new).and_return("response") end + it "should add an extension if one is set" do + subject.extension = :json + subject.connection.should_receive(:run_request).with(:get, "http://example.com/foo.json", nil, nil).and_return(valid_response) + subject.request(:get, "foo") + end + it "should return a response object" do subject.connection.should_receive(:run_request).with(:get, "http://example.com/foo", nil, nil).and_return(valid_response) response = subject.request(:get, "foo") response.should eql("response") end