Skip to content

Instantly share code, notes, and snippets.

@brian428
Created September 26, 2012 05:14
Show Gist options
  • Save brian428/3786230 to your computer and use it in GitHub Desktop.
Save brian428/3786230 to your computer and use it in GitHub Desktop.
SpyOn_andCallFake.coffee
it "should allow getting the current company to be faked", ->
grid = viewController.getCompanyGridPanel()
spyOn( viewController, 'getCurrentCompany').andCallFake( ->
return "Fake Company"
)
expect( viewController.getCurrentCompany() ).toBe( "Fake Company" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment