class ParallelProgressFormatter
Attributes
controller[R]
Public Class Methods
new(output)
click to toggle source
# File lib/parallel_rspec_progress/formatter.rb, line 14 def initialize(output) @output = output @controller = DRbObject.new_with_uri('druby://localhost:9999') end
Public Instance Methods
close(notification)
click to toggle source
# File lib/parallel_rspec_progress/formatter.rb, line 23 def close(notification) if ParallelTests.last_process? ParallelTests.wait_for_other_processes_to_finish controller.stop end end
example_failed(notification)
click to toggle source
# File lib/parallel_rspec_progress/formatter.rb, line 35 def example_failed(notification) controller.add(key: :failed, item: notification.example.location) end
example_passed(notification)
click to toggle source
# File lib/parallel_rspec_progress/formatter.rb, line 31 def example_passed(notification) controller.add(key: :passed, item: notification.example.location) end
example_pending(notification)
click to toggle source
# File lib/parallel_rspec_progress/formatter.rb, line 39 def example_pending(notification) controller.add(key: :pending, item: notification.example.location) end
start(notification)
click to toggle source
# File lib/parallel_rspec_progress/formatter.rb, line 19 def start(notification) controller.put_total(notification.count) end