Module: ManiokBdd::RSpec::DocumentationFormatter::InstanceMethods
- Defined in:
- lib/maniok_bdd/rspec/documentation_formatter.rb
Instance Method Summary collapse
- #example_passed_with_steps(example) ⇒ Object
- #example_started_with_steps(example) ⇒ Object
- #example_step_failed(example_group, type, message, options) ⇒ Object
- #example_step_passed(example_group, type, message, options) ⇒ Object
- #example_step_pending(example_group, type, message, options) ⇒ Object
Instance Method Details
#example_passed_with_steps(example) ⇒ Object
25 26 27 |
# File 'lib/maniok_bdd/rspec/documentation_formatter.rb', line 25 def example_passed_with_steps(example) example_passed_without_steps(example) unless example.[:with_steps] end |
#example_started_with_steps(example) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/maniok_bdd/rspec/documentation_formatter.rb', line 16 def example_started_with_steps(example) example_started_without_steps(example) if example.[:with_steps] = "#{current_indentation}#{example.description}" output.puts fixed_color() end end |
#example_step_failed(example_group, type, message, options) ⇒ Object
46 47 48 49 |
# File 'lib/maniok_bdd/rspec/documentation_formatter.rb', line 46 def example_step_failed(example_group, type, , ) = "#{current_indentation} #{type.to_s.capitalize} #{} (FAILED)" output.puts failure_color() end |
#example_step_passed(example_group, type, message, options) ⇒ Object
29 30 31 32 |
# File 'lib/maniok_bdd/rspec/documentation_formatter.rb', line 29 def example_step_passed(example_group, type, , ) = "#{current_indentation} #{type.to_s.capitalize} #{}" output.puts success_color() end |
#example_step_pending(example_group, type, message, options) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/maniok_bdd/rspec/documentation_formatter.rb', line 34 def example_step_pending(example_group, type, , ) = "#{current_indentation} #{type.to_s.capitalize} #{}" if [:pending] && [:pending] != true << " (PENDING: #{[:pending]})" else << " (PENDING)" end output.puts pending_color() end |