Skip to content

Commit 63ed6ca

Browse files
committed
Add test for e0e3adf
1 parent 82b0ce9 commit 63ed6ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

activerecord/test/cases/attribute_methods_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ def test_read_write_boolean_attribute
247247
# puts ""
248248
end
249249

250+
def test_read_overridden_attribute
251+
topic = Topic.new(:title => 'a')
252+
def topic.title() 'b' end
253+
assert_equal 'a', topic[:title]
254+
end
255+
250256
def test_query_attribute_string
251257
[nil, "", " "].each do |value|
252258
assert_equal false, Topic.new(:author_name => value).author_name?

0 commit comments

Comments
 (0)