Module: RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue

Defined in:
lib/rspec/support.rb

Constant Summary collapse

AVOID_RESCUING =

These exceptions are dangerous to rescue as rescuing them would interfere with things we should not interfere with.

[NoMemoryError, SignalException, Interrupt, SystemExit]

Class Method Summary collapse

Class Method Details

.===(exception) ⇒ Object



127
128
129
# File 'lib/rspec/support.rb', line 127

def self.===(exception)
  AVOID_RESCUING.none? { |ar| ar === exception }
end