mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
11 lines
360 B
Ruby
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
|