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

20 lines
400 B
CoffeeScript
Raw Normal View History

2012-01-11 19:30:10 +00:00
class jasmine.GWT.Feature
constructor: (@name, @code) ->
run: =>
2012-01-11 19:30:10 +00:00
jasmine.GWT.currentFeature_ = this
@background = null
@code.apply(this)
2012-01-11 19:30:10 +00:00
jasmine.GWT.currentFeature_ = null
Scenario: (name, code) ->
scenario = new jasmine.GWT.Scenario(name, code, this)
scenario.run()
2012-01-11 19:30:10 +00:00
Background: (code) ->
@background = new jasmine.GWT.Background(code)
@background.run()
2012-01-11 19:30:10 +00:00