class Lopata::GroupStep

@private Used for context

Public Instance Methods

execution_steps(scenario, groups: []) click to toggle source
# File lib/lopata/step.rb, line 77
def execution_steps(scenario, groups: [])
  steps = []
  return steps if condition && !condition.match?(scenario)
  @steps.each do |step|
    steps += step.execution_steps(scenario, groups: groups + [self])
  end
  steps.reject! { |s| !s.block }
  steps.reject { |s| s.teardown_group?(self) } + steps.select { |s| s.teardown_group?(self) }
end
let_methods() click to toggle source
# File lib/lopata/step.rb, line 87
def let_methods
  @let_methods ||= {}
end

Private Instance Methods

initialized!() click to toggle source

Group step's block is a block in context of builder, not scenario. So hide the @block to not be used in scenario.

# File lib/lopata/step.rb, line 94
def initialized!
  builder = Lopata::ScenarioBuilder.new(title)
  builder.instance_exec(&@block)
  @steps = builder.steps
  @block = nil
end