Module: PartyParrot::FormatterUtilities

Included in:
PartyParrot::Formatters::RSpec3::Base
Defined in:
lib/party_parrot/formatter_utilities.rb

Constant Summary collapse

TEXT_DECORATION =
{
  :black   => 30,
  :red     => 31,
  :green   => 32,
  :yellow  => 33,
  :blue    => 34,
  :magenta => 35,
  :cyan    => 36,
  :white   => 37,
  :bold    => 1,
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_exampleObject (readonly)

Returns the value of attribute current_example.



35
36
37
# File 'lib/party_parrot/formatter_utilities.rb', line 35

def current_example
  @current_example
end

Instance Method Details

#example_failed(notification) ⇒ Object



31
32
33
# File 'lib/party_parrot/formatter_utilities.rb', line 31

def example_failed(notification)
  process_example(:failed)
end

#example_passed(notification) ⇒ Object



23
24
25
# File 'lib/party_parrot/formatter_utilities.rb', line 23

def example_passed(notification)
  process_example(:passed)
end

#example_pending(notification) ⇒ Object



27
28
29
# File 'lib/party_parrot/formatter_utilities.rb', line 27

def example_pending(notification)
  process_example(:pending)
end

#example_started(notification) ⇒ Object



20
21
# File 'lib/party_parrot/formatter_utilities.rb', line 20

def example_started(notification)
end

#start(notification) ⇒ Object



15
16
17
18
# File 'lib/party_parrot/formatter_utilities.rb', line 15

def start(notification)
  @passed_count = @failed_count = @pending_count = @current_example = 0
  @example_count = notification.count
end