class Proc

Public Instance Methods

change?() { || ... } click to toggle source
# File lib/minitest/bacon.rb, line 175
def change?
  before = yield
  call
  after = yield
  before != after
end
raise?(*exceptions) click to toggle source
# File lib/minitest/bacon.rb, line 158
def raise?(*exceptions)
  exceptions = [RuntimeError] if exceptions.empty?
  call
rescue *exceptions => e
  e
else
  false
end
throw?(sym) click to toggle source
# File lib/minitest/bacon.rb, line 167
def throw?(sym)
  not catch(sym) {
    call
    return false
  }
  return true
end