diff options
Diffstat (limited to 'jni/ruby/test/testunit/test_redefinition.rb')
-rw-r--r-- | jni/ruby/test/testunit/test_redefinition.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jni/ruby/test/testunit/test_redefinition.rb b/jni/ruby/test/testunit/test_redefinition.rb new file mode 100644 index 0000000..ed11621 --- /dev/null +++ b/jni/ruby/test/testunit/test_redefinition.rb @@ -0,0 +1,15 @@ +require 'test/unit' + +class TestRedefinition < Test::Unit::TestCase + def test_redefinition + assert_match(/^test\/unit warning: method TestForTestRedefinition#test_redefinition is redefined$/, + redefinition) + end + + def redefinition(*args) + IO.popen([*@options[:ruby], "#{File.dirname(__FILE__)}/test4test_redefinition.rb", *args], + err: [:child, :out]) {|f| + f.read + } + end +end |