modify example code

'response' method is deprecated. use 'respondWith' instead of
This commit is contained in:
Mstudio-Ishikawa 2014-11-29 14:19:44 +09:00
parent d9da8636f9
commit d3d64a87b8

View File

@ -126,7 +126,7 @@ Now that you've defined some test responses and installed the mock, you need to
describe("on success", function() {
beforeEach(function() {
request.response(TestResponses.search.success);
request.respondWith(TestResponses.search.success);
});
Now for all the specs in this example group, whenever an Ajax response is sent, it will use the `TestResponses.search.success` object defined in your test responses to build the XMLHttpRequest object.
@ -159,7 +159,7 @@ Putting it all together, you can install the mock, pass some spies as callbacks
describe("on success", function() {
beforeEach(function() {
request.response(TestResponses.search.success);
request.respondWith(TestResponses.search.success);
});
it("calls onSuccess with an array of Locations", function() {