Module: Minitest::Byebug

Included in:
Test
Defined in:
lib/minitest/byebug.rb

Overview

Start a byebug session when an assertion fails

Instance Method Summary collapse

Instance Method Details

#assert(test, msg = nil) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/minitest/byebug.rb', line 11

def assert(test, msg = nil)
  begin
    super
  rescue Minitest::Assertion => e
    warn "Assertion Failed. Dropping into byebug now:"
    byebug
    raise e
  end
end

#skip(msg = nil, bt = caller) ⇒ Object



7
8
9
# File 'lib/minitest/byebug.rb', line 7

def skip(msg = nil, bt = caller)
  super unless ENV['NO_SKIP']
end