Class: Matcha::Runner::Example
- Inherits:
-
Object
- Object
- Matcha::Runner::Example
- Defined in:
- lib/matcha/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.
8 9 10 |
# File 'lib/matcha/runner.rb', line 8 def initialize(row) @row = row end |
Instance Method Details
#failure_message ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/matcha/runner.rb', line 16 def 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
12 13 14 |
# File 'lib/matcha/runner.rb', line 12 def passed? @row['passed'] end |