Skip to content

Instantly share code, notes, and snippets.

@yashke
Created February 5, 2012 21:45
Show Gist options
  • Save yashke/1748072 to your computer and use it in GitHub Desktop.
Save yashke/1748072 to your computer and use it in GitHub Desktop.
describe "SomeUsecase", ->
describe "#execute", ->
beforeEach ->
spyOn(@usecase, 'doSmthWith').andFakeCall(=> null)
it "should pass name parameter as second to callback", ->
@usecase.execute("name")
args = @usecase.doSmthWith.mostRecentCall.args
expect(args[1]).toBe("name")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment