mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_module.rb (TestModule#test_mod_constants): should
not depend on global Module constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f4d37a3ff4
commit
5e9cfca2d4
2 changed files with 8 additions and 4 deletions
|
@ -3,6 +3,9 @@ Mon Oct 6 12:45:20 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
* test/ruby/test_module.rb (TestModule#_wrap_assertion): add
|
* test/ruby/test_module.rb (TestModule#_wrap_assertion): add
|
||||||
definition. is this really needed?
|
definition. is this really needed?
|
||||||
|
|
||||||
|
* test/ruby/test_module.rb (TestModule#test_mod_constants): should
|
||||||
|
not depend on global Module constants.
|
||||||
|
|
||||||
Mon Oct 6 12:38:36 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Mon Oct 6 12:38:36 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/test/unit/assertions.rb (Test::Assertions#assert_nothing_raised):
|
* lib/test/unit/assertions.rb (Test::Assertions#assert_nothing_raised):
|
||||||
|
|
|
@ -544,10 +544,11 @@ class TestModule < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_mod_constants
|
def test_mod_constants
|
||||||
Module.const_set(:Foo, :foo)
|
m = Module.new
|
||||||
assert_equal([:Foo], Module.constants(true))
|
m.const_set(:Foo, :foo)
|
||||||
assert_equal([:Foo], Module.constants(false))
|
assert_equal([:Foo], m.constants(true))
|
||||||
Module.instance_eval { remove_const(:Foo) }
|
assert_equal([:Foo], m.constants(false))
|
||||||
|
m.instance_eval { remove_const(:Foo) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_frozen_class
|
def test_frozen_class
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue