Created
April 12, 2011 19:57
-
-
Save joevandyk/916256 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' | |
module M | |
def f | |
CONSTANT + 1 | |
end | |
end | |
class C | |
CONSTANT = 1 | |
include M | |
end | |
class D | |
CONSTANT = 2 | |
include M | |
end | |
class TestIt < Test::Unit::TestCase | |
def test_c | |
assert_equal 2, C.new.f | |
end | |
def test_d | |
assert_equal 3, D.new.f | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment