Class: Evergreen::Runner::Example
- Inherits:
-
Object
- Object
- Evergreen::Runner::Example
- Defined in:
- lib/evergreen/runner.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(row) ⇒ Example
constructor
A new instance of Example.
- #passed? ⇒ Boolean
Constructor Details
#initialize(row) ⇒ Example
Returns a new instance of Example.
4 5 6 |
# File 'lib/evergreen/runner.rb', line 4 def initialize(row) @row = row end |
Instance Method Details
#failure_message ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/evergreen/runner.rb', line 12 def unless passed? msg = [] msg << " Failed: #{@row['name']}" msg << " #{@row['message']}" if @row['trace']['stack'] match_data = @row['trace']['stack'].match(/\/run\/(.*\.js)/) msg << " in #{match_data[1]}" if match_data[1] end msg.join("\n") end end |
#passed? ⇒ Boolean
8 9 10 |
# File 'lib/evergreen/runner.rb', line 8 def passed? @row['passed'] end |