From e129a4c8ef5b9bffc696202a73575c8ead187175 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Tue, 2 Apr 2013 11:37:58 +0900 Subject: Add test cases. --- test/t/module.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/t/module.rb') diff --git a/test/t/module.rb b/test/t/module.rb index 6c1c1acda..1ff9d3aea 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -129,6 +129,21 @@ assert('Module#const_get', '15.2.2.4.23') do Test4ConstSet.const_get(:Const4Test4ConstSet) == 23 end +assert('Module.constants', '15.2.2.4.24') do + $n = [] + module TestA + Const = 1 + end + class TestB + include TestA + Const2 = 1 + $n = constants.sort + end + + TestA.constants == [ :Const ] and + $n == [ :Const, :Const2 ] +end + assert('Module#include', '15.2.2.4.27') do module Test4Include Const4Include = 42 -- cgit v1.2.3