Class: Cucumber::Formatter::LegacyApi::Adapter::LegacyResultBuilder
- Inherits:
-
Object
- Object
- 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.
949 950 951 952 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 949 def initialize(result) @result = result @result.describe_to(self) end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
948 949 950 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 948 def status @status end |
Instance Method Details
#append_to_exception_backtrace(line) ⇒ Object
979 980 981 982 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 979 def append_to_exception_backtrace(line) @exception.set_backtrace(@exception.backtrace + [line.to_s]) if @exception return self end |
#describe_exception_to(formatter) ⇒ Object
1000 1001 1002 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 1000 def describe_exception_to(formatter) formatter.exception(filtered_exception, @status) if @exception end |
#duration(duration) ⇒ Object
984 985 986 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 984 def duration(duration, *) @duration = duration end |
#exception(exception) ⇒ Object
975 976 977 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 975 def exception(exception, *) @exception = exception end |
#failed ⇒ Object
958 959 960 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 958 def failed @status = :failed end |
#passed ⇒ Object
954 955 956 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 954 def passed @status = :passed end |
#pending(exception) ⇒ Object
970 971 972 973 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 970 def pending(exception, *) @exception = exception @status = :pending end |
#scenario(name, location) ⇒ Object
992 993 994 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 992 def scenario(name, location) Ast::Scenario.new(@status, name, location) end |
#scenario_outline(name, location) ⇒ Object
996 997 998 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 996 def scenario_outline(name, location) Ast::ScenarioOutline.new(@status, name, location) end |
#skipped ⇒ Object
966 967 968 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 966 def skipped @status = :skipped end |
#step_invocation(step_match, step, indent, background, configuration, messages, embeddings) ⇒ Object
988 989 990 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 988 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
962 963 964 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 962 def undefined @status = :undefined end |