Sha256: a4caff98c23f05a568067cd9f5d5315717e2ec2851bac8f5ed85076a02853898
Contents?: true
Size: 1.09 KB
Versions: 35
Compression:
Stored size: 1.09 KB
Contents
require 'cucumber/step_mother' module Cucumber # Defines "global" methods that may be used in *_steps.rb files. module StepMethods # Each scenario will execute in the context of what the supplied block returns. def World(&proc) executor.register_world_proc(&proc) end def Before(&proc) executor.register_before_scenario_proc(&proc) end def After(&proc) executor.register_after_scenario_proc(&proc) end def AfterStep(&proc) executor.register_after_step_proc(&proc) end def Given(key, &proc) step_mother.register_step_proc(key, &proc) end def When(key, &proc) step_mother.register_step_proc(key, &proc) end def Then(key, &proc) step_mother.register_step_proc(key, &proc) end # Simple workaround for old skool steps def steps_for(*_) STDERR.puts "WARNING: In Cucumber the steps_for method is obsolete" yield end def step_mother #:nodoc: @step_mother ||= StepMother.new end def executor @executor ||= Executor.new(step_mother) end end end
Version data entries
35 entries across 35 versions & 7 rubygems