Fix test ordering bug related to introducing masked Name class

This commit is contained in:
Yehuda Katz
2010-02-19 10:31:51 -08:00
parent 2f98032fc9
commit 2f821a0a98

View File

@@ -55,18 +55,6 @@ class Name
end
end
$nowhere = <<-EOF
class Name
delegate :nowhere
end
EOF
$noplace = <<-EOF
class Name
delegate :noplace, :tos => :hollywood
end
EOF
class ModuleTest < Test::Unit::TestCase
def setup
@david = Someone.new("David", Somewhere.new("Paulina", "Chicago"))
@@ -87,8 +75,12 @@ class ModuleTest < Test::Unit::TestCase
end
def test_missing_delegation_target
assert_raise(ArgumentError) { eval($nowhere) }
assert_raise(ArgumentError) { eval($noplace) }
assert_raise(ArgumentError) do
Name.send :delegate, :nowhere
end
assert_raise(ArgumentError) do
Name.send :delegate, :noplace, :tos => :hollywood
end
end
def test_delegation_prefix