Sha256: fd9654b37387d22bcd825d2b61f55cbc610c1d9b98e614fe511c1e1fcd6fda0d

Contents?: true

Size: 866 Bytes

Versions: 2

Compression:

Stored size: 866 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_match(pattern, actual, message = nil)
  raise "#{"#{message}\n" if message}'#{pattern}' expected, but got '#{actual}'" unless pattern =~ actual
end
def assert_matches(*args)
  warn '"assert_matches" is deprecated.  Use "assert_match" instead, for Minitest compatibility.'
  assert_match(*args)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruboto-1.6.1 assets/test/src/test_helper.rb
ruboto-1.6.0 assets/test/src/test_helper.rb