Class: Buildkite::TestCollector::MinitestPlugin::Trace
- Defined in:
- lib/buildkite/test_collector/minitest_plugin/trace.rb
Constant Summary collapse
- RESULT_CODES =
{ '.' => 'passed', 'F' => 'failed', 'E' => 'failed', 'S' => 'pending', }
- FILE_PATH_REGEX =
/^(.*?\.(rb|feature))/
Instance Attribute Summary collapse
-
#example ⇒ Object
Returns the value of attribute example.
-
#failure_expanded ⇒ Object
writeonly
Sets the attribute failure_expanded.
-
#failure_reason ⇒ Object
writeonly
Sets the 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:, tags: nil, trace: nil, location_prefix: nil) ⇒ Trace
constructor
A new instance of Trace.
- #result ⇒ Object
- #source_location ⇒ Object
Methods inherited from Trace
Constructor Details
#initialize(example, history:, tags: nil, trace: nil, location_prefix: nil) ⇒ Trace
Returns a new instance of Trace.
20 21 22 23 24 25 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 20 def initialize(example, history:, tags: nil, trace: nil, location_prefix: nil) @example = example @history = history @tags = @location_prefix = location_prefix end |
Instance Attribute Details
#example ⇒ Object
Returns the value of attribute example.
5 6 7 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 5 def example @example end |
#failure_expanded=(value) ⇒ Object
Sets the attribute failure_expanded
6 7 8 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 6 def (value) @failure_expanded = value end |
#failure_reason=(value) ⇒ Object
Sets the attribute failure_reason
6 7 8 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 6 def failure_reason=(value) @failure_reason = value end |
#history ⇒ Object (readonly)
Returns the value of attribute history.
7 8 9 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 7 def history @history end |
#location_prefix ⇒ Object (readonly)
Returns the value of attribute location_prefix.
8 9 10 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 8 def location_prefix @location_prefix end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
9 10 11 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 9 def @tags end |
Instance Method Details
#result ⇒ Object
27 28 29 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 27 def result RESULT_CODES[example.result_code] end |
#source_location ⇒ Object
31 32 33 |
# File 'lib/buildkite/test_collector/minitest_plugin/trace.rb', line 31 def source_location @source_location ||= example.method(example.name).source_location end |