Skip to content

Instantly share code, notes, and snippets.

@ddonahue99
Created September 7, 2011 14:55
Show Gist options
  • Save ddonahue99/1200789 to your computer and use it in GitHub Desktop.
Save ddonahue99/1200789 to your computer and use it in GitHub Desktop.
Controller spec with expectation
'renders 404 when the project is not found': (controller) ->
@response = new mocks.Response()
@response.render = (params...) ->
@correct = (params[0] == '404')
controller.show(new mocks.Request(app_id: 1), @response)
assert.ok @response.correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment