Sha256: 6d1f8cebfdb7ceb3e582c9ea984e2025f061ce7d963c13b0eb927a6b15524841
Contents?: true
Size: 483 Bytes
Versions: 7
Compression:
Stored size: 483 Bytes
Contents
module Bioshogi module Assertion extend self def assert(actual = nil, message = "assert failed", &block) if block_given? actual = yield end unless actual raise MustNotHappen, "#{message}: #{actual.inspect}" end end def assert_equal(expected, actual, message = "assert_equal failed") if expected != actual raise MustNotHappen, "#{message}: #{expected.inspect} != #{actual.inspect}" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems