Module: Test::Unit::Assertions

Defined in:
lib/handshake.rb

Instance Method Summary collapse

Instance Method Details

#assert_passes(&block) ⇒ Object



568
569
570
# File 'lib/handshake.rb', line 568

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.



564
565
566
# File 'lib/handshake.rb', line 564

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