Skip to content

Instantly share code, notes, and snippets.

@johnbintz
Created June 6, 2011 21:07
Show Gist options
  • Save johnbintz/1011110 to your computer and use it in GitHub Desktop.
Save johnbintz/1011110 to your computer and use it in GitHub Desktop.
Modular extensions to Jasmine specs using CoffeeScript & Underscore
describe 'A thing', ->
it 'should make an other thing', ->
this.utilityFunction("test")
expect(this.otherThing).toEqual("test")
MySpecHelper = {
utilityFunction: (thing) ->
this.otherThing = thing
}
_.extend(jasmine.Spec.prototype, MySpecHelper)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment