class Bacon::TestUnitOutput::TapOutput::Proc

Public Instance Methods

change?() { || ... } click to toggle source
# File lib/bacon.rb, line 263
def change?
  pre_result = yield
  called = call
  post_result = yield
  pre_result != post_result
end
raise?(*exceptions) click to toggle source
# File lib/bacon.rb, line 239
def raise?(*exceptions)
  exceptions = [RuntimeError]  if exceptions.empty?
  call

# Only to work in 1.9.0, rescue with splat doesn't work there right now
rescue Object => e
  case e
  when *exceptions
    e
  else
    raise e
  end
else
  false
end
throw?(sym) click to toggle source
# File lib/bacon.rb, line 255
def throw?(sym)
  catch(sym) {
    call
    return false
  }
  return true
end