Class: Evergreen::Runner::Example

Inherits:
Object
  • Object
show all
Defined in:
lib/evergreen/runner.rb

Instance Method Summary collapse

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_messageObject



12
13
14
15
16
17
18
19
20
# File 'lib/evergreen/runner.rb', line 12

def failure_message
  unless passed?
    msg = []
    msg << "  Failed: #{@row['name']}"
    msg << "    #{@row['message']}"
    msg << "    in #{@row['trace']['fileName']}:#{@row['trace']['lineNumber']}" if @row['trace']
    msg.join("\n")
  end
end

#passed?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/evergreen/runner.rb', line 8

def passed?
  @row['passed']
end