diff options
author | nagachika <nagachika@ruby-lang.org> | 2020-07-23 17:22:45 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2020-07-23 17:22:45 +0900 |
commit | c53cee7a0e7b3e87ba3fbafa86bd74460af18d93 (patch) | |
tree | 5e746d8aad86978777af69f10ead96e220b672fd /test/-ext- | |
parent | ae804b143455075687c8b4a401fba48fda72a217 (diff) | |
download | ruby-c53cee7a0e7b3e87ba3fbafa86bd74460af18d93.tar.gz |
merge revision(s) 72c02aa4b79731c7f25c9267f74b347f1946c704: [Backport #16662]
Moved not-implemented method tests [Bug #16662]
Test not-implemented method with the dedicated methods, instead of
platform dependent features.
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/test_notimplement.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/-ext-/test_notimplement.rb b/test/-ext-/test_notimplement.rb index 92a2fd22b8..038b507b73 100644 --- a/test/-ext-/test_notimplement.rb +++ b/test/-ext-/test_notimplement.rb @@ -13,10 +13,17 @@ class Test_NotImplement < Test::Unit::TestCase end def test_respond_to + assert_include(Bug.methods(false), :notimplement) + assert_include(Bug::NotImplement.instance_methods(false), :notimplement) assert_not_respond_to(Bug, :notimplement) assert_not_respond_to(Bug::NotImplement.new, :notimplement) end + def test_method_inspect_notimplement + assert_match(/not-implemented/, Bug.method(:notimplement).inspect) + assert_match(/not-implemented/, Bug::NotImplement.instance_method(:notimplement).inspect) + end + def test_not_method_defined assert !Bug::NotImplement.method_defined?(:notimplement) assert !Bug::NotImplement.method_defined?(:notimplement, true) |