Skip to content

Instantly share code, notes, and snippets.

@kyanny
Forked from koba04/deferred_spec.coffee
Last active August 29, 2015 14:04
Show Gist options
  • Save kyanny/d1ea5cbcb18a2abe04d2 to your computer and use it in GitHub Desktop.
Save kyanny/d1ea5cbcb18a2abe04d2 to your computer and use it in GitHub Desktop.
describe "App.request", ->
deferred = null
beforeEach ->
sinon.stub(App, "request").yieldsTo('done', {res: "ok"})
afterEach ->
App.request.restore()
it "res should be 'ok'", (done) ->
App.request("foo:bar:baz").done (obj) ->
expect(obj.res).to.be "ok"
done()
@kyanny
Copy link
Author

kyanny commented Jul 16, 2014

request expected to yield to 'done', but no object with such a property was passed. Received [foo:bar:baz]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment