Class: Cucumber::Formatter::LegacyApi::Adapter::LegacyResultBuilder
- Defined in:
- lib/cucumber/formatter/legacy_api/adapter.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #append_to_exception_backtrace(line) ⇒ Object
- #describe_exception_to(formatter) ⇒ Object
- #duration(duration) ⇒ Object
- #exception(exception) ⇒ Object
- #failed ⇒ Object
-
#initialize(result) ⇒ LegacyResultBuilder
constructor
A new instance of LegacyResultBuilder.
- #passed ⇒ Object
- #pending(exception) ⇒ Object
- #scenario(name, location) ⇒ Object
- #scenario_outline(name, location) ⇒ Object
- #skipped ⇒ Object
- #step_invocation(step_match, step, indent, background, configuration, messages, embeddings) ⇒ Object
- #undefined ⇒ Object
Constructor Details
#initialize(result) ⇒ LegacyResultBuilder
Returns a new instance of LegacyResultBuilder.
937 938 939 940 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 937 def initialize(result) @result = result @result.describe_to(self) end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
936 937 938 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 936 def status @status end |
Instance Method Details
#append_to_exception_backtrace(line) ⇒ Object
967 968 969 970 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 967 def append_to_exception_backtrace(line) @exception.set_backtrace(@exception.backtrace + [line.to_s]) if @exception return self end |
#describe_exception_to(formatter) ⇒ Object
988 989 990 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 988 def describe_exception_to(formatter) formatter.exception(filtered_exception, @status) if @exception end |
#duration(duration) ⇒ Object
972 973 974 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 972 def duration(duration, *) @duration = duration end |
#exception(exception) ⇒ Object
963 964 965 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 963 def exception(exception, *) @exception = exception end |
#failed ⇒ Object
946 947 948 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 946 def failed @status = :failed end |
#passed ⇒ Object
942 943 944 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 942 def passed @status = :passed end |
#pending(exception) ⇒ Object
958 959 960 961 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 958 def pending(exception, *) @exception = exception @status = :pending end |
#scenario(name, location) ⇒ Object
980 981 982 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 980 def scenario(name, location) Ast::Scenario.new(@status, name, location) end |
#scenario_outline(name, location) ⇒ Object
984 985 986 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 984 def scenario_outline(name, location) Ast::ScenarioOutline.new(@status, name, location) end |
#skipped ⇒ Object
954 955 956 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 954 def skipped @status = :skipped end |
#step_invocation(step_match, step, indent, background, configuration, messages, embeddings) ⇒ Object
976 977 978 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 976 def step_invocation(step_match, step, indent, background, configuration, , ) Ast::StepInvocation.new(step_match, @status, @duration, step_exception(step, configuration), indent, background, step, , ) end |
#undefined ⇒ Object
950 951 952 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 950 def undefined @status = :undefined end |