Skip to content

Instantly share code, notes, and snippets.

@tombruijn
Created November 9, 2012 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tombruijn/4045020 to your computer and use it in GitHub Desktop.
Save tombruijn/4045020 to your computer and use it in GitHub Desktop.
Konacha testing setup for classes
# app/assets/javascripts/failer.js.coffee
class Failer
ze: (i) ->
i + "wa"
window.failer = new Failer
# spec/javascripts/failer_spec.js.coffee
#= require spec_helper
#= require failer
describe "falier class", ->
it "is spec-ed", ->
failer = window.failer
failer.ze('hoi').should.equal('hoiwa')
failer.ze('hoi').should.equal('hoiwaadsfdsafdas') # This one will fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment