Created
September 10, 2010 17:46
-
-
Save mkaschenko/574060 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
C = "top level" | |
class AboutConstants < EdgeCase::Koan | |
C = "nested" | |
def test_nested_constants_may_also_be_referenced_with_relative_paths | |
assert_equal "nested", C | |
end | |
def test_top_level_constants_are_referenced_by_double_colons | |
assert_equal "top level", ::C | |
end | |
def test_nested_constants_are_referenced_by_their_complete_path | |
assert_equal "nested", AboutConstants::C | |
assert_equal "nested", ::AboutConstants::C | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment