Module: Test::Unit::Assertions

Defined in:
lib/handshake.rb

Instance Method Summary collapse

Instance Method Details

#assert_passes(&block) ⇒ Object



585
586
587
# File 'lib/handshake.rb', line 585

def assert_passes(&block)
  assert_nothing_raised(&block)
end

#assert_violation(&block) ⇒ Object

Asserts that the given block violates the contract by raising an instance of Handshake::ContractViolation.



581
582
583
# File 'lib/handshake.rb', line 581

def assert_violation(&block)
  assert_raise(Handshake::ContractViolation, Handshake::AssertionFailed, &block)
end