Module: Kernel
- Defined in:
- lib/gauge.rb
Instance Method Summary collapse
-
#after_scenario(options, &block) ⇒ Object
Invoked after execution of every scenario.
-
#after_spec(options, &block) ⇒ Object
Invoked after execution of every specification.
-
#after_step(options, &block) ⇒ Object
Invoked after execution of every step.
-
#after_suite(&block) ⇒ Object
Invoked after execution of the entire suite.
-
#before_scenario(options, &block) ⇒ Object
Invoked before execution of every scenario.
-
#before_spec(options, &block) ⇒ Object
Invoked before execution of every specification.
-
#before_step(options, &block) ⇒ Object
Invoked before execution of every step.
-
#before_suite(&block) ⇒ Object
Invoked before execution of the entire suite.
-
#step(*args, &block) ⇒ Object
Specify implementation for a given step.
Instance Method Details
#after_scenario(options, &block) ⇒ Object
Invoked after execution of every scenario.
117 |
# File 'lib/gauge.rb', line 117 tagged_hook 'after_scenario' |
#after_spec(options, &block) ⇒ Object
Invoked after execution of every specification.
113 |
# File 'lib/gauge.rb', line 113 tagged_hook 'after_spec' |
#after_step(options, &block) ⇒ Object
Invoked after execution of every step.
109 |
# File 'lib/gauge.rb', line 109 tagged_hook 'after_step' |
#after_suite(&block) ⇒ Object
Invoked after execution of the entire suite.
121 |
# File 'lib/gauge.rb', line 121 hook 'after_suite' |
#before_scenario(options, &block) ⇒ Object
Invoked before execution of every scenario.
115 |
# File 'lib/gauge.rb', line 115 tagged_hook 'before_scenario' |
#before_spec(options, &block) ⇒ Object
Invoked before execution of every specification.
111 |
# File 'lib/gauge.rb', line 111 tagged_hook 'before_spec' |
#before_step(options, &block) ⇒ Object
Invoked before execution of every step.
107 |
# File 'lib/gauge.rb', line 107 tagged_hook 'before_step' |
#before_suite(&block) ⇒ Object
Invoked before execution of the entire suite.
119 |
# File 'lib/gauge.rb', line 119 hook 'before_suite' |
#step(*args, &block) ⇒ Object
Specify implementation for a given step
92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/gauge.rb', line 92 def step(*args, &block) opts = args.select {|x| x.is_a? Hash} step_texts = args - opts opts = { continue_on_failure: false }.merge opts.reduce({}, :merge) step_texts.each do |text| step_value = Gauge::Util.step_value(text) si = { location: { file: ENV['GAUGE_STEP_FILE'], span: {} }, block: block, step_text: text, recoverable: opts[:continue_on_failure] } Gauge::MethodCache.add_step(step_value, si) end Gauge::MethodCache.add_step_alias(*step_texts) end |