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.
130 |
# File 'lib/gauge.rb', line 130 tagged_hook 'after_scenario' |
#after_spec(options, &block) ⇒ Object
Invoked after execution of every specification.
126 |
# File 'lib/gauge.rb', line 126 tagged_hook 'after_spec' |
#after_step(options, &block) ⇒ Object
Invoked after execution of every step.
122 |
# File 'lib/gauge.rb', line 122 tagged_hook 'after_step' |
#after_suite(&block) ⇒ Object
Invoked after execution of the entire suite.
134 |
# File 'lib/gauge.rb', line 134 hook 'after_suite' |
#before_scenario(options, &block) ⇒ Object
Invoked before execution of every scenario.
128 |
# File 'lib/gauge.rb', line 128 tagged_hook 'before_scenario' |
#before_spec(options, &block) ⇒ Object
Invoked before execution of every specification.
124 |
# File 'lib/gauge.rb', line 124 tagged_hook 'before_spec' |
#before_step(options, &block) ⇒ Object
Invoked before execution of every step.
120 |
# File 'lib/gauge.rb', line 120 tagged_hook 'before_step' |
#before_suite(&block) ⇒ Object
Invoked before execution of the entire suite.
132 |
# File 'lib/gauge.rb', line 132 hook 'before_suite' |
#step(*args, &block) ⇒ Object
Specify implementation for a given step
105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/gauge.rb', line 105 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::Connector.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 |