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.



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

def initialize(output)
  @output = output
end

Instance Method Details

#example_failed(notification) ⇒ Object



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

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

#example_passed(notification) ⇒ Object



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

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

#example_pending(notification) ⇒ Object



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

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

#example_started(notification) ⇒ Object



26
27
28
# File 'lib/kanoah_result_formatter.rb', line 26

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

#start(notification) ⇒ Object



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

def start(notification)
  super(notification)
end