aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorYehuda Katz <yehudakatz@YK.local>2010-02-19 10:31:51 -0800
committerYehuda Katz <yehudakatz@YK.local>2010-02-19 10:31:51 -0800
commit2f821a0a987902cbe69ba04eb2fe04ea757682a3 (patch)
treebacfae4ee6c75e7047b403c56faa60e966da8f13 /activesupport
parent2f98032fc92ce16125f8628b4d3c283f10494f4d (diff)
downloadrails-2f821a0a987902cbe69ba04eb2fe04ea757682a3.tar.gz
rails-2f821a0a987902cbe69ba04eb2fe04ea757682a3.tar.bz2
rails-2f821a0a987902cbe69ba04eb2fe04ea757682a3.zip
Fix test ordering bug related to introducing masked Name class
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/core_ext/module_test.rb20
1 files changed, 6 insertions, 14 deletions
diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb
index 1fe75d5930..9edd7cc7c0 100644
--- a/activesupport/test/core_ext/module_test.rb
+++ b/activesupport/test/core_ext/module_test.rb
@@ -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