class Cucumber::Ast::OutlineTable::ExampleRow
:nodoc:
def accept(visitor)
def accept(visitor) return if Cucumber.wants_to_quit visitor.configuration.expand? ? accept_expand(visitor) : accept_plain(visitor) end
def accept_expand(visitor)
def accept_expand(visitor) if header? else visitor.step_mother.with_hooks(self) do @table.visit_scenario_name(visitor, self) @step_invocations.each do |step_invocation| step_invocation.invoke(visitor.step_mother, visitor.configuration) @exception ||= step_invocation.reported_exception step_invocation.visit_step_result(visitor) end end end end
def accept_hook?(hook)
def accept_hook?(hook) @table.accept_hook?(hook) end
def accept_plain(visitor)
def accept_plain(visitor) if header? @cells.each do |cell| cell.status = :skipped_param visitor.visit_table_cell(cell) end else visitor.step_mother.with_hooks(self) do @step_invocations.each do |step_invocation| step_invocation.invoke(visitor.step_mother, visitor.configuration) @exception ||= step_invocation.reported_exception end @cells.each do |cell| visitor.visit_table_cell(cell) end visitor.visit_exception(@scenario_exception, :failed) if @scenario_exception end end end
def backtrace_line
def backtrace_line @scenario_outline.backtrace_line(name, line) end
def create_step_invocations!(scenario_outline)
def create_step_invocations!(scenario_outline) @scenario_outline = scenario_outline @step_invocations = scenario_outline.step_invocations(self) end
def exception
def exception @exception || @scenario_exception end
def fail!(exception)
def fail!(exception) @scenario_exception = exception end
def failed?
def failed? raise InvalidForHeaderRowError if header? @step_invocations.failed? || !!@scenario_exception end
def header?
def header? index == 0 end
def initialize(table, cells)
def initialize(table, cells) super @scenario_exception = nil end
def language
def language @table.language end
def name
def name "| #{@cells.collect{|c| c.value }.join(' | ')} |" end
def passed?
def passed? !failed? end
def skip_invoke!
def skip_invoke! @step_invocations.each do |step_invocation| step_invocation.skip_invoke! end end
def source_tag_names
def source_tag_names @table.source_tag_names end
def status
def status return :failed if @scenario_exception @step_invocations.status end