Module: Test::Unit::AssertionsWithPend

Included in:
TestCase
Defined in:
lib/test-unit-ext/pending.rb

Instance Method Summary collapse

Instance Method Details

#pend(message = "Pended", &block) ⇒ Object



71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/test-unit-ext/pending.rb', line 71

def pend(message="Pended", &block)
  if block_given?
    begin
      yield
    rescue Exception
      raise PendedError, message, $!.backtrace
    end
    flunk("Pending block should not be passed: #{message}")
  else
    raise PendedError.new(message)
  end
end