aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2013-04-25 19:45:41 -0700
committerGuillermo Iguaran <guilleiguaran@gmail.com>2013-04-25 19:45:41 -0700
commit23b6e9d85d4a57ab0a24ae5e03965ff6c8de5bca (patch)
tree687a3ab3a44578ebd11772c68e06fcc6d4699df6 /activesupport/test/core_ext
parentd495606168f638b272f5775b2a0a796f13ab7c1b (diff)
parentccbe02343934956d3bb11c7167e0493f9d8f08fd (diff)
downloadrails-23b6e9d85d4a57ab0a24ae5e03965ff6c8de5bca.tar.gz
rails-23b6e9d85d4a57ab0a24ae5e03965ff6c8de5bca.tar.bz2
rails-23b6e9d85d4a57ab0a24ae5e03965ff6c8de5bca.zip
Merge pull request #10347 from lellisga/delegation_bug_documentation
Delegation method bug
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/module_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb
index 82249ddd1b..9a8582075d 100644
--- a/activesupport/test/core_ext/module_test.rb
+++ b/activesupport/test/core_ext/module_test.rb
@@ -171,6 +171,11 @@ class ModuleTest < ActiveSupport::TestCase
assert_nil rails.name
end
+ def test_delegation_with_allow_nil_and_invalid_value
+ rails = Project.new("Rails", "David")
+ assert_raise(NoMethodError) { rails.name }
+ end
+
def test_delegation_with_allow_nil_and_nil_value_and_prefix
Project.class_eval do
delegate :name, :to => :person, :allow_nil => true, :prefix => true