Skip to content

Commit e5dc4fa

Browse files
committed
[test] some versions miss assert_not_same method
1 parent ecc1a05 commit e5dc4fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/ruby/test_helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ def assert_nothing_raised
9393
end
9494
end
9595

96+
unless method_defined?(:assert_not_same)
97+
def assert_not_same(expected, actual)
98+
assert ! expected.equal?(actual), "expected: #{expected} to be same as: #{actual} but did"
99+
end
100+
end
101+
96102
def self.disable_security_restrictions!; end # do nothing on MRI
97103

98104
@@security_restrictions = nil

0 commit comments

Comments
 (0)