Created
March 19, 2011 05:41
-
-
Save Watson1978/877254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test/unit/assertions.rb' | |
include Test::Unit::Assertions | |
module ConstantSpecs | |
class ParentA | |
CS_CONST20 = :const20_2 | |
end | |
class ContainerA | |
class ChildA < ParentA | |
def self.const20; CS_CONST20; end | |
end | |
end | |
end | |
assert_equal(:const20_2, ConstantSpecs::ContainerA::ChildA.const20) | |
class ::Object | |
CS_CONST20 = :const20_1 | |
module ConstantSpecs | |
class ContainerA | |
class ChildA | |
def self.const20; CS_CONST20; end | |
end | |
end | |
end | |
end | |
assert_equal(:const20_1, ConstantSpecs::ContainerA::ChildA.const20) | |
puts :ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment