Sha256: 5534dab88542f75ec7cec75631c29f2fbf7092463070ee372d68e892b8f82efe

Contents?: true

Size: 763 Bytes

Versions: 5

Compression:

Stored size: 763 Bytes

Contents

require 'rspec/core'
RSpec::Support.require_rspec_core "formatters/bisect_progress_formatter"

module RSpec::Core::Formatters
  BisectProgressFormatter = Class.new(remove_const :BisectProgressFormatter) do
    RSpec::Core::Formatters.register self

    def bisect_round_started(notification)
      return super unless @round_count == 3

      Process.kill("INT", Process.pid)
      # Process.kill is not a synchronous call, so to ensure the output
      # below aborts at a deterministic place, we need to block here.
      # The sleep will be interrupted by the signal once the OS sends it.
      # For the most part, this is only needed on JRuby, but we saw
      # the asynchronous behavior on an MRI 2.0 travis build as well.
      sleep 5
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 rspec-core/upstream/features/support/send_sigint_during_bisect.rb
opal-rspec-1.1.0.alpha2 rspec-core/upstream/features/support/send_sigint_during_bisect.rb
opal-rspec-1.1.0.alpha1 rspec-core/upstream/features/support/send_sigint_during_bisect.rb
opal-rspec-1.0.0 rspec-core/upstream/features/support/send_sigint_during_bisect.rb
opal-rspec-1.0.0.alpha1 rspec-core/upstream/features/support/send_sigint_during_bisect.rb