Sha256: ab3d4db4a6efe1360323402462e990a5ec30683f0821bed2d06ee05973b39e4d
Contents?: true
Size: 956 Bytes
Versions: 3
Compression:
Stored size: 956 Bytes
Contents
#Cucumber provides a number of hooks which allow us to run blocks at various points in the Cucumber test cycle Before do # Do something before each scenario. end Before do |scenario| # The +scenario+ argument is optional, but if you use it, you can get the title, # description, or name (title + description) of the scenario that is about to be # executed. end After do # Do something after each scenario. end After do |scenario| # Do something after each scenario. # The +scenario+ argument is optional, but # if you use it, you can inspect status with # the #failed?, #passed? and #exception methods. if(scenario.failed?) #Do something if scenario fails. end end #Tagged hooks Before('@Ex_tag1, @Ex_tag2') do # This will only run before scenarios tagged # with @cucumis OR @sativus. end AfterStep('@Ex_tag1, @Ex_tag2') do # This will only run after steps within scenarios tagged # with @cucumis AND @sativus. end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
applenium-0.0.3 | template/support/hooks.rb |
applenium-0.0.2 | template/support/hooks.rb |
applenium-0.0.1 | template/support/hooks.rb |