2012-01-11 19:30:10 +00:00
|
|
|
class jasmine.GWT.Feature
|
2012-01-18 22:41:08 +00:00
|
|
|
constructor: (@name, @code) ->
|
|
|
|
|
|
|
|
run: =>
|
2012-01-11 19:30:10 +00:00
|
|
|
jasmine.GWT.currentFeature_ = this
|
|
|
|
|
|
|
|
@background = null
|
2012-01-18 22:41:08 +00:00
|
|
|
@code.apply(this)
|
2012-01-11 19:30:10 +00:00
|
|
|
|
|
|
|
jasmine.GWT.currentFeature_ = null
|
|
|
|
|
|
|
|
Scenario: (name, code) ->
|
2012-01-18 22:41:08 +00:00
|
|
|
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)
|
2012-01-18 22:41:08 +00:00
|
|
|
@background.run()
|
2012-01-11 19:30:10 +00:00
|
|
|
|