aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/attribute_methods_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2011-01-07 16:24:06 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2011-01-07 16:25:25 -0800
commit63ed6ca9989fbfcd2b323b98e4110c7504b8d3db (patch)
tree63518fb6c6344c094466db5a65783ecd5f7e46af /activerecord/test/cases/attribute_methods_test.rb
parent82b0ce9c978a1b73d5974604b90c5b7299eed65a (diff)
downloadrails-63ed6ca9989fbfcd2b323b98e4110c7504b8d3db.tar.gz
rails-63ed6ca9989fbfcd2b323b98e4110c7504b8d3db.tar.bz2
rails-63ed6ca9989fbfcd2b323b98e4110c7504b8d3db.zip
Add test for e0e3adf
Diffstat (limited to 'activerecord/test/cases/attribute_methods_test.rb')
-rw-r--r--activerecord/test/cases/attribute_methods_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index e3cbae4a84..a29e4349d6 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -247,6 +247,12 @@ class AttributeMethodsTest < ActiveRecord::TestCase
# puts ""
end
+ def test_read_overridden_attribute
+ topic = Topic.new(:title => 'a')
+ def topic.title() 'b' end
+ assert_equal 'a', topic[:title]
+ end
+
def test_query_attribute_string
[nil, "", " "].each do |value|
assert_equal false, Topic.new(:author_name => value).author_name?