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

18 lines
464 B
CoffeeScript
Raw Normal View History

2012-01-11 19:30:10 +00:00
jasmine.GWT =
Step: (type, name, parameter) ->
if scenario = jasmine.GWT.currentScenario_
scenario[type](name, parameter)
else
jasmine.GWT.Steps[type] ||= []
jasmine.GWT.Steps[type].push([ name, parameter ])
Hook: (type, code) ->
jasmine.GWT.Hooks[type] ||= []
jasmine.GWT.Hooks[type].push(code)
runHook: (type, context) ->
for code in (jasmine.GWT.Hooks[type] || [])
code.apply(context)
Steps: {}
Hooks: {}