test/support/restfully_accesible_stub.rb in yao-0.10.1 vs test/support/restfully_accesible_stub.rb in yao-0.11.0
- old
+ new
@@ -1,6 +1,6 @@
-module RestfullAccessibleStub
+module RestfullyAccessibleStub
def stub_get_request(url, resource_name)
stub_request(:get, url)
.with(
headers: request_headers
).to_return(
@@ -14,10 +14,10 @@
.with(
headers: request_headers
).to_return(
status: 200,
headers: {'Content-Type' => 'application/json'},
- body: body.to_json
+ body: body.class == String ? body : body.to_json
)
end
def stub_get_request_not_found(url)
stub_request(:get, url)