This commit is contained in:
Jeremy Kemper
2011-01-07 16:24:06 -08:00
parent 82b0ce9c97
commit 63ed6ca998

View File

@@ -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?