class Cucumber::LegacyResultBuilder
Attributes
status[R]
Public Class Methods
new(result)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 948 def initialize(result) @result = result @result.describe_to(self) end
Public Instance Methods
append_to_exception_backtrace(line)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 978 def append_to_exception_backtrace(line) @exception.set_backtrace(@exception.backtrace + [line.to_s]) if @exception return self end
describe_exception_to(formatter)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 999 def describe_exception_to(formatter) formatter.exception(filtered_exception, @status) if @exception end
duration(duration, *)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 983 def duration(duration, *) @duration = duration end
exception(exception, *)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 974 def exception(exception, *) @exception = exception end
failed()
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 957 def failed @status = :failed end
passed()
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 953 def passed @status = :passed end
pending(exception, *)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 969 def pending(exception, *) @exception = exception @status = :pending end
scenario(name, location)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 991 def scenario(name, location) Ast::Scenario.new(@status, name, location) end
scenario_outline(name, location)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 995 def scenario_outline(name, location) Ast::ScenarioOutline.new(@status, name, location) end
skipped()
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 965 def skipped @status = :skipped end
step_invocation(step_match, step, indent, background, configuration, messages, embeddings)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 987 def step_invocation(step_match, step, indent, background, configuration, messages, embeddings) Ast::StepInvocation.new(step_match, @status, @duration, step_exception(step, configuration), indent, background, step, messages, embeddings) end
undefined()
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 961 def undefined @status = :undefined end
Private Instance Methods
filtered_exception()
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 1013 def filtered_exception Cucumber::Formatter::BacktraceFilter.new(@exception.dup).exception end
filtered_step_exception(_step)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 1017 def filtered_step_exception(_step) exception = filtered_exception return Cucumber::Formatter::BacktraceFilter.new(exception).exception end
step_exception(step, configuration)
click to toggle source
# File lib/cucumber/formatter/legacy_api/adapter.rb, line 1005 def step_exception(step, configuration) return filtered_step_exception(step) if @exception return nil unless @status == :undefined && configuration.strict.strict?(:undefined) @exception = Cucumber::Undefined.from(@result, step.text) @exception.backtrace << step.backtrace_line filtered_step_exception(step) end