Class: Konacha::Example
- Inherits:
-
Object
- Object
- Konacha::Example
- Defined in:
- lib/konacha/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.
93 94 95 |
# File 'lib/konacha/runner.rb', line 93 def initialize(row) @row = row end |
Instance Method Details
#failure_message ⇒ Object
101 102 103 104 105 106 107 108 109 |
# File 'lib/konacha/runner.rb', line 101 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
97 98 99 |
# File 'lib/konacha/runner.rb', line 97 def passed? @row['passed'] end |