Skip to content

Instantly share code, notes, and snippets.

@koba04
Created July 16, 2014 08:29
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 koba04/abb430b531fa1da22d95 to your computer and use it in GitHub Desktop.
Save koba04/abb430b531fa1da22d95 to your computer and use it in GitHub Desktop.
describe "App.request", ->
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()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment