Class: Buildkite::TestCollector::RSpecPlugin::Trace
- Defined in:
- lib/buildkite/test_collector/rspec_plugin/trace.rb
Constant Summary collapse
- FILE_PATH_REGEX =
/^(.*?\.(rb|feature))/
Instance Attribute Summary collapse
-
#example ⇒ Object
Returns the value of attribute example.
-
#failure_expanded ⇒ Object
Returns the value of attribute failure_expanded.
-
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
-
#history ⇒ Object
readonly
Returns the value of attribute history.
-
#location_prefix ⇒ Object
readonly
Returns the value of attribute location_prefix.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(example, history:, failure_reason: nil, failure_expanded: [], tags: nil, location_prefix: nil) ⇒ Trace
constructor
A new instance of Trace.
- #result ⇒ Object
Methods inherited from Trace
Constructor Details
#initialize(example, history:, failure_reason: nil, failure_expanded: [], tags: nil, location_prefix: nil) ⇒ Trace
Returns a new instance of Trace.
12 13 14 15 16 17 18 19 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 12 def initialize(example, history:, failure_reason: nil, failure_expanded: [], tags: nil, location_prefix: nil) @example = example @history = history @failure_reason = failure_reason = = @location_prefix = location_prefix end |
Instance Attribute Details
#example ⇒ Object
Returns the value of attribute example.
5 6 7 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 5 def example @example end |
#failure_expanded ⇒ Object
Returns the value of attribute failure_expanded.
5 6 7 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 5 def end |
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
5 6 7 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 5 def failure_reason @failure_reason end |
#history ⇒ Object (readonly)
Returns the value of attribute history.
6 7 8 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 6 def history @history end |
#location_prefix ⇒ Object (readonly)
Returns the value of attribute location_prefix.
8 9 10 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 8 def location_prefix @location_prefix end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
7 8 9 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 7 def end |
Instance Method Details
#result ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/buildkite/test_collector/rspec_plugin/trace.rb', line 21 def result case example.execution_result.status when :passed; "passed" when :failed; "failed" when :pending; "skipped" end end |