Module: RSpec::ExampleSteps::DocumentationFormatter::InstanceMethods
- Defined in:
- lib/rspec/example_steps/documentation_formatter.rb
Instance Method Summary collapse
- #example_passed_with_steps(notification) ⇒ Object
- #example_started(notification) ⇒ Object
- #example_started_with_steps(notification) ⇒ Object
- #example_step_failed(notification) ⇒ Object
- #example_step_passed(notification) ⇒ Object
- #example_step_pending(notification) ⇒ Object
Instance Method Details
#example_passed_with_steps(notification) ⇒ Object
29 30 31 |
# File 'lib/rspec/example_steps/documentation_formatter.rb', line 29 def example_passed_with_steps(notification) example_passed_without_steps(notification.example) unless notification.example.[:with_steps] end |
#example_started(notification) ⇒ Object
17 18 |
# File 'lib/rspec/example_steps/documentation_formatter.rb', line 17 def example_started(notification) end |
#example_started_with_steps(notification) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/rspec/example_steps/documentation_formatter.rb', line 20 def example_started_with_steps(notification) example_started_without_steps(notification) if notification.example.[:with_steps] = "#{current_indentation}#{notification.example.description}" output.puts Core::Formatters::ConsoleCodes.wrap(, :default) end end |
#example_step_failed(notification) ⇒ Object
50 51 52 53 |
# File 'lib/rspec/example_steps/documentation_formatter.rb', line 50 def example_step_failed(notification) = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.} (FAILED)" output.puts Core::Formatters::ConsoleCodes.wrap(, :failure) end |
#example_step_passed(notification) ⇒ Object
33 34 35 36 |
# File 'lib/rspec/example_steps/documentation_formatter.rb', line 33 def example_step_passed(notification) = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.}" output.puts Core::Formatters::ConsoleCodes.wrap(, :success) end |
#example_step_pending(notification) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/rspec/example_steps/documentation_formatter.rb', line 38 def example_step_pending(notification) = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.}" if notification.[:pending] && notification.[:pending] != true << " (PENDING: #{notification.[:pending]})" else << " (PENDING)" end output.puts Core::Formatters::ConsoleCodes.wrap(, :pending) end |