Module: Kernel

Defined in:
lib/passert/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#assert(*args, &block) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/passert/core_ext.rb', line 6

def assert(*args, &block)
  Passert.assert(*args, &block)
rescue AssertionFailed => e
  # Remove this method from the backtrace, since it's not helpful.
  e.backtrace.shift
  raise e
end

#assert?(*args, &block) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/passert/core_ext.rb', line 14

def assert?(*args, &block)
  Passert.assert?(*args, &block)
end