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
105 106 107 108 109 110 111 112 113 114 115 116 |
# 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| parameterized_step_text = Gauge::Connector.step_value(text) Gauge::MethodCache.add_step(parameterized_step_text, &block) Gauge::MethodCache.add_step_text(parameterized_step_text, text) Gauge::MethodCache.set_recoverable(parameterized_step_text) if opts[:continue_on_failure] end Gauge::MethodCache.add_step_alias(*step_texts) end |