Skip to content

Instantly share code, notes, and snippets.

@joachimhs
Created October 17, 2014 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joachimhs/4b7046b2b74751ed82ff to your computer and use it in GitHub Desktop.
Save joachimhs/4b7046b2b74751ed82ff to your computer and use it in GitHub Desktop.
helper
Ember.Test.registerHelper("mockAjaxGet", function(app, url, responseStatus, responseJson) {
console.log("STUBBING: " + url + " responseStatus: " + responseStatus + " JSON: " + responseJson);
window.server.get(url, function(request) {
return [responseStatus, {"Content-Type": "application/json"}, responseJson];
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment