Module: RSpec::Specify::InstanceMethods
- Defined in:
- lib/specify/rspec/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
54 55 56 |
# File 'lib/specify/rspec/documentation_formatter.rb', line 54 def example_passed_with_steps(notification) example_passed_without_steps(notification) unless notification.example.[:with_steps] end |
#example_started(notification) ⇒ Object
18 19 |
# File 'lib/specify/rspec/documentation_formatter.rb', line 18 def example_started(notification) end |
#example_started_with_steps(notification) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/specify/rspec/documentation_formatter.rb', line 45 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
27 28 29 30 31 |
# File 'lib/specify/rspec/documentation_formatter.rb', line 27 def example_step_failed(notification) = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message} (FAILED)" unless notification.type.to_s == 'specify' = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message} (FAILED)" if notification.type.to_s == 'specify' output.puts Core::Formatters::ConsoleCodes.wrap(, :failure) end |
#example_step_passed(notification) ⇒ Object
21 22 23 24 25 |
# File 'lib/specify/rspec/documentation_formatter.rb', line 21 def example_step_passed(notification) = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message}" unless notification.type.to_s == 'specify' = "#{current_indentation} #{notification.message}" if notification.type.to_s == 'specify' output.puts Core::Formatters::ConsoleCodes.wrap(, :success) end |
#example_step_pending(notification) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/specify/rspec/documentation_formatter.rb', line 33 def example_step_pending(notification) = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message}" if notification.[:pending] && notification.[:pending] != true << " (PENDING: #{notification.options[:pending]})" else << ' (PENDING)' end output.puts Core::Formatters::ConsoleCodes.wrap(, :pending) end |