class IOOutput

Constants

SEPARATOR

Attributes

io[R]

Public Class Methods

new(io = STDOUT) click to toggle source
# File lib/rspec-search-and-destroy/io_output.rb, line 6
def initialize(io = STDOUT)
  @io = io
end

Public Instance Methods

found(causal_example, failed_example) click to toggle source
# File lib/rspec-search-and-destroy/io_output.rb, line 10
  def found(causal_example, failed_example)
    io.puts <<FOUND
#{SEPARATOR}
Culprit found
Run    #{causal_example[:location]}
Before #{failed_example[:location]}
FOUND
  end
progress(state) click to toggle source
# File lib/rspec-search-and-destroy/io_output.rb, line 19
  def progress(state)
    run_time = Duration.new(state.run_time)

    io.puts <<PROGRESS
#{SEPARATOR}
Iteration #{state.iteration}
#{state.enabled_examples} / #{state.total_examples} examples enabled
Running for #{run_time}
PROGRESS
  end