Sha256: dd166bf5cf67f251e75992e1ef287e0be662e31f1a5d1e98552bee8570c15d23
Contents?: true
Size: 718 Bytes
Versions: 6
Compression:
Stored size: 718 Bytes
Contents
require 'java' def assert(value, message = nil) raise "#{"#{message}\n" if message}#{value.inspect} expected to be true" unless value end def fail(message = nil) assert false, message || 'Failure' end def assert_equal(expected, actual, message = nil) raise "#{"#{message}\n" if message}'#{expected}' expected, but got '#{actual}'" unless expected == actual end def assert_less_than_or_equal(limit, actual, message = nil) raise "#{"#{message}\n" if message}Expected '#{actual}' to be less than or equal to '#{limit}'" unless actual <= limit end def assert_matches(pattern, actual, message = nil) raise "#{"#{message}\n" if message}'#{pattern}' expected, but got '#{actual}'" unless pattern =~ actual end
Version data entries
6 entries across 6 versions & 1 rubygems