Last active
August 29, 2015 14:04
-
-
Save koba04/e0c1016e80fc19c71192 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "App.request", -> | |
deferred = null | |
beforeEach -> | |
deferred = $.Deferred() | |
sinon.stub(App, "request").returns deferred.promise() | |
afterEach -> | |
App.request.restore() | |
it "res should be 'ok'", (done) -> | |
App.request("foo:bar:baz").done (obj) -> | |
expect(obj.res).to.be "ok" | |
done() | |
deferred.resolve res: "ok" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment