Class: KanoahResultFormatter

Inherits:
KanoahRSpecFormatter::BaseFormatter show all
Defined in:
lib/kanoah_result_formatter.rb

Constant Summary

Constants inherited from KanoahRSpecFormatter::BaseFormatter

KanoahRSpecFormatter::BaseFormatter::NOTIFICATIONS

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ KanoahResultFormatter

Returns a new instance of KanoahResultFormatter.



5
6
7
# File 'lib/kanoah_result_formatter.rb', line 5

def initialize(output)
  @output = output
end

Instance Method Details

#example_failed(notification) ⇒ Object



13
14
15
# File 'lib/kanoah_result_formatter.rb', line 13

def example_failed(notification)
  proccess_result(notification.example) if notification.example..key?(:test_id) && !test_id(notification.example).empty?
end

#example_passed(notification) ⇒ Object



9
10
11
# File 'lib/kanoah_result_formatter.rb', line 9

def example_passed(notification)
  proccess_result(notification.example) if notification.example..key?(:test_id) && !test_id(notification.example).empty?
end

#example_pending(notification) ⇒ Object



17
18
19
# File 'lib/kanoah_result_formatter.rb', line 17

def example_pending(notification)
  proccess_result(notification.example) if notification.example..key?(:test_id) && !test_id(notification.example).empty?
end

#example_started(notification) ⇒ Object



21
22
23
# File 'lib/kanoah_result_formatter.rb', line 21

def example_started(notification)
  notification.example.[:step_index] = 0
end