jasmine-gwt/lib/assets/javascripts/jasmine/GWT/Background.js.coffee

18 lines
390 B
CoffeeScript
Raw Normal View History

2012-01-11 19:30:10 +00:00
class jasmine.GWT.Background
constructor: (code) ->
@statements = []
jasmine.GWT.currentScenario_ = this
code.apply(this)
jasmine.GWT.currentScenario_ = null
Given: (name, code) ->
@statements.push([ 'Given', name, code ])
When: (name, code) ->
@statements.push([ 'When', name, code ])
Then: (name, code) ->
@statements.push([ 'Then', name, code ])