Class: RSpec::Core::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/spec-talks/patches.rb

Class Method Summary collapse

Class Method Details

.autorunObject

Register an at_exit hook that runs the suite.



6
7
8
9
10
11
# File 'lib/spec-talks/patches.rb', line 6

def self.autorun
  ::Talks.say 'Tests start'
  return if autorun_disabled? || installed_at_exit? || running_in_drb?
  at_exit { exit run(ARGV, $stderr, $stdout).to_i unless $! }
  @installed_at_exit = true
end