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.
129 |
# File 'lib/gauge.rb', line 129 tagged_hook 'after_scenario' |
#after_spec(options, &block) ⇒ Object
Invoked after execution of every specification.
125 |
# File 'lib/gauge.rb', line 125 tagged_hook 'after_spec' |
#after_step(options, &block) ⇒ Object
Invoked after execution of every step.
121 |
# File 'lib/gauge.rb', line 121 tagged_hook 'after_step' |
#after_suite(&block) ⇒ Object
Invoked after execution of the entire suite.
133 |
# File 'lib/gauge.rb', line 133 hook 'after_suite' |
#before_scenario(options, &block) ⇒ Object
Invoked before execution of every scenario.
127 |
# File 'lib/gauge.rb', line 127 tagged_hook 'before_scenario' |
#before_spec(options, &block) ⇒ Object
Invoked before execution of every specification.
123 |
# File 'lib/gauge.rb', line 123 tagged_hook 'before_spec' |
#before_step(options, &block) ⇒ Object
Invoked before execution of every step.
119 |
# File 'lib/gauge.rb', line 119 tagged_hook 'before_step' |
#before_suite(&block) ⇒ Object
Invoked before execution of the entire suite.
131 |
# File 'lib/gauge.rb', line 131 hook 'before_suite' |
#step(*args, &block) ⇒ Object
Specify implementation for a given step
104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/gauge.rb', line 104 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 |