Class: CukePuke::Formatter
- Inherits:
-
Object
- Object
- CukePuke::Formatter
- Defined in:
- lib/cuke_puke/formatter.rb
Constant Summary collapse
- VOICE_FOR =
{ :feature => 'vicki', :scenario => 'ralph', :step => 'fred' }
Instance Method Summary collapse
- #before_feature(feature) ⇒ Object
- #before_step(step) ⇒ Object
-
#initialize(*args) ⇒ Formatter
constructor
A new instance of Formatter.
- #scenario_name(keyword, name, file_colon_line, source_indent) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Formatter
Returns a new instance of Formatter.
10 11 |
# File 'lib/cuke_puke/formatter.rb', line 10 def initialize( *args ) end |
Instance Method Details
#before_feature(feature) ⇒ Object
21 22 23 |
# File 'lib/cuke_puke/formatter.rb', line 21 def before_feature(feature) say "feature: #{feature.name}", VOICE_FOR[:feature] end |
#before_step(step) ⇒ Object
13 14 15 |
# File 'lib/cuke_puke/formatter.rb', line 13 def before_step( step ) say "#{step.keyword} #{step.name}", VOICE_FOR[:step] end |
#scenario_name(keyword, name, file_colon_line, source_indent) ⇒ Object
17 18 19 |
# File 'lib/cuke_puke/formatter.rb', line 17 def scenario_name(keyword, name, file_colon_line, source_indent) say "scenario: #{name}", VOICE_FOR[:scenario] end |