Class: RSpec::Specify::Formatter
- Inherits:
-
Core::Formatters::DocumentationFormatter
- Object
- Core::Formatters::DocumentationFormatter
- RSpec::Specify::Formatter
- Defined in:
- lib/specify/rspec/formatter.rb
Instance Method Summary collapse
- #example_passed(notification) ⇒ Object
- #example_started(notification) ⇒ Object
- #example_step_failed(notification) ⇒ Object
- #example_step_passed(notification) ⇒ Object
- #example_step_pending(notification) ⇒ Object
Instance Method Details
#example_passed(notification) ⇒ Object
26 27 28 |
# File 'lib/specify/rspec/formatter.rb', line 26 def example_passed(notification) super unless notification.example.[:has_steps] end |
#example_started(notification) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/specify/rspec/formatter.rb', line 14 def example_started(notification) return unless notification.example.[:has_steps] indentation = current_indentation description = notification.example.description = "#{indentation}#{description}" output.puts( ::RSpec::Core::Formatters::ConsoleCodes.wrap(, :default) ) end |
#example_step_failed(notification) ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/specify/rspec/formatter.rb', line 41 def example_step_failed(notification) indentation = current_indentation step_type = notification.type.to_s.capitalize = notification. = "#{indentation} #{step_type} #{} (FAILED)" output.puts( ::RSpec::Core::Formatters::ConsoleCodes.wrap(, :failure) ) end |
#example_step_passed(notification) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/specify/rspec/formatter.rb', line 30 def example_step_passed(notification) indentation = current_indentation step_type = notification.type.to_s.capitalize = notification. = "#{indentation} #{step_type} #{}" output.puts( ::RSpec::Core::Formatters::ConsoleCodes.wrap(, :success) ) end |
#example_step_pending(notification) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/specify/rspec/formatter.rb', line 52 def example_step_pending(notification) indentation = current_indentation step_type = notification.type.to_s.capitalize = notification. = "#{indentation} #{step_type} #{}" << if notification.[:pending] && notification.[:pending] != true " (PENDING: #{notification.[:pending]})" else " (PENDING)" end output.puts( ::RSpec::Core::Formatters::ConsoleCodes.wrap(, :pending) ) end |