summaryrefslogtreecommitdiffhomepage
path: root/test/t/module.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-04-22 22:29:15 +0900
committerGitHub <[email protected]>2019-04-22 22:29:15 +0900
commit7cf1bc39a7184e92b0fe534e610b288accc61e5a (patch)
treecaadc76a38aaec44327fd44558739e15a675d4ce /test/t/module.rb
parent5ab8ca41a5a64183784c739b82da9e4cd87bbc79 (diff)
parent716a99b069461b11c2b46099119f8578cd2c8f3f (diff)
downloadmruby-7cf1bc39a7184e92b0fe534e610b288accc61e5a.tar.gz
mruby-7cf1bc39a7184e92b0fe534e610b288accc61e5a.zip
Merge pull request #4356 from shuujii/add-assert_match-and-assert_not_match
Add `assert_match` and `assert_not_match`
Diffstat (limited to 'test/t/module.rb')
-rw-r--r--test/t/module.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index da0f78fad..09613e1bc 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -651,11 +651,8 @@ assert('Module#to_s') do
assert_equal 'SetOuter', SetOuter.to_s
assert_equal 'SetOuter::SetInner', SetOuter::SetInner.to_s
- mod = Module.new
- cls = Class.new
-
- assert_equal "#<Module:0x", mod.to_s[0,11]
- assert_equal "#<Class:0x", cls.to_s[0,10]
+ assert_match "#<Module:0x*>", Module.new.to_s
+ assert_match "#<Class:0x*>", Class.new.to_s
end
assert('Module#inspect') do