1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/test/testunit/test_redefinition.rb
2021-09-17 08:54:18 +09:00

11 lines
360 B
Ruby

# frozen_string_literal: false
require 'test/unit'
class TestRedefinition < Test::Unit::TestCase
def test_redefinition
message = %r[test/unit: method TestForTestRedefinition#test_redefinition is redefined$]
assert_raise_with_message(Test::Unit::AssertionFailedError, message) do
require_relative("test4test_redefinition.rb")
end
end
end