Class: GreenPepper::HeaderError

Inherits:
KeywordError show all
Defined in:
lib/greenpepper/writer/freetextresult.rb

Instance Attribute Summary

Attributes inherited from ExampleResult

#silent

Instance Method Summary collapse

Methods inherited from KeywordError

#error?, #update_stats

Methods included from KeywordFormat

#error, #green_highlight, #grey_highlight, #highlight, #indent, #indent2, #newline, #red_highlight, #yellow_highlight

Methods inherited from ExampleResult

#error?, #failure?, #ignored?, #success?, #update_stats

Constructor Details

#initialize(fixture_name, error) ⇒ HeaderError

Returns a new instance of HeaderError.



206
207
208
209
# File 'lib/greenpepper/writer/freetextresult.rb', line 206

def initialize(fixture_name, error)
  @fixture_name = fixture_name
  @error = error
end

Instance Method Details

#write(action) ⇒ Object



211
212
213
214
# File 'lib/greenpepper/writer/freetextresult.rb', line 211

def write(action)
  "Scenario: " + yellow_highlight(@fixture_name) + 
    indent(error(@error))
end