Permalink
Browse files

Add test for e0e3adf

  • Loading branch information...
1 parent 82b0ce9 commit 63ed6ca9989fbfcd2b323b98e4110c7504b8d3db @jeremy jeremy committed Jan 8, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/test/cases/attribute_methods_test.rb
@@ -247,6 +247,12 @@ def test_read_write_boolean_attribute
# 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?

0 comments on commit 63ed6ca

Please sign in to comment.