Skip to content

Instantly share code, notes, and snippets.

@jejacks0n
Created January 18, 2012 04:00
Show Gist options
  • Save jejacks0n/1630851 to your computer and use it in GitHub Desktop.
Save jejacks0n/1630851 to your computer and use it in GitHub Desktop.
Get jasmine to tell you if a spec doesn't have any expectations
jasmine.Spec::expect = (actual) ->
@tested = true
positive = new (@getMatchersClass_())(@env, actual, this)
positive.not = new (@getMatchersClass_())(@env, actual, this, true)
return positive
jasmine.Runner::finishCallback = ->
for spec in @specs()
alert("#{spec.description} wasn't tested") unless spec.tested
@env.reporter.reportRunnerResults(@)
@jejacks0n
Copy link
Author

minor updates -- I munged the demonstration code when removing my code.

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