Module: Test::Unit::Assertions

Defined in:
lib/handshake/handshake.rb

Instance Method Summary collapse

Instance Method Details

#assert_passes(&block) ⇒ Object



732
733
734
# File 'lib/handshake/handshake.rb', line 732

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.



728
729
730
# File 'lib/handshake/handshake.rb', line 728

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