summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-class-ext/test
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-class-ext/test')
-rw-r--r--mrbgems/mruby-class-ext/test/module.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/mrbgems/mruby-class-ext/test/module.rb b/mrbgems/mruby-class-ext/test/module.rb
index cfe6a540f..65abde108 100644
--- a/mrbgems/mruby-class-ext/test/module.rb
+++ b/mrbgems/mruby-class-ext/test/module.rb
@@ -22,3 +22,13 @@ assert 'Module#name' do
assert_nil mod.name
assert_nil cls.name
end
+
+assert 'Module#singleton_class?' do
+ mod = Module.new
+ cls = Class.new
+ scl = cls.singleton_class
+
+ assert_false mod.singleton_class?
+ assert_false cls.singleton_class?
+ assert_true scl.singleton_class?
+end