Skip to content

Commit fafdd1e

Browse files
committed
set-up missing asserts on updated minitest (comes with 9K)
1 parent 0c855eb commit fafdd1e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/ruby/test_helper.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ def skip(msg = nil)
5252
end
5353
end
5454

55+
unless method_defined?(:assert_not_equal)
56+
def assert_not_equal(expected, actual)
57+
assert expected != actual, "expected: #{expected} to not equal: #{actual} but did"
58+
end
59+
end
60+
61+
unless method_defined?(:assert_nothing_raised)
62+
def assert_nothing_raised
63+
begin
64+
yield
65+
rescue => e
66+
assert false, "unexpected error raised: #{e.inspect}"
67+
end
68+
end
69+
end
70+
5571
def self.disable_security_restrictions!; end # do nothing on MRI
5672

5773
def self.disable_security_restrictions!

0 commit comments

Comments
 (0)