aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/attribute_methods_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-03-17 23:17:20 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-17 23:17:20 -0300
commit445241d713782262134ede64a967369f803076ff (patch)
tree2a56fe2412d0179c3b9561c7c5eb8b7d9ae77647 /activemodel/test/cases/attribute_methods_test.rb
parent4532b39f5faa15af957e3b41b671f07ed201488d (diff)
downloadrails-445241d713782262134ede64a967369f803076ff.tar.gz
rails-445241d713782262134ede64a967369f803076ff.tar.bz2
rails-445241d713782262134ede64a967369f803076ff.zip
define_attr_method should be able to define methods that returns nil
Diffstat (limited to 'activemodel/test/cases/attribute_methods_test.rb')
-rw-r--r--activemodel/test/cases/attribute_methods_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activemodel/test/cases/attribute_methods_test.rb b/activemodel/test/cases/attribute_methods_test.rb
index 7fa5a2a7d7..e814666d99 100644
--- a/activemodel/test/cases/attribute_methods_test.rb
+++ b/activemodel/test/cases/attribute_methods_test.rb
@@ -115,6 +115,8 @@ class AttributeMethodsTest < ActiveModel::TestCase
assert_respond_to ModelWithAttributes, :bar
assert_equal "original bar", ModelWithAttributes.original_bar
assert_equal "bar", ModelWithAttributes.bar
+ ModelWithAttributes.define_attr_method(:bar)
+ assert !ModelWithAttributes.bar
end
test '#define_attr_method generates attribute method with invalid identifier characters' do