aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-12-01 11:24:30 +0000
committerJon Leighton <j@jonathanleighton.com>2011-12-01 23:41:51 +0000
commit3a40d386194cf6d572b145cea0da57c286204554 (patch)
tree2d8d28049fa7baef3b0dd440dcbcde315c4ed6bb /activerecord/test
parent3dcb127109428c1948a9f3bcad7101bd8a7f4d8a (diff)
downloadrails-3a40d386194cf6d572b145cea0da57c286204554.tar.gz
rails-3a40d386194cf6d572b145cea0da57c286204554.tar.bz2
rails-3a40d386194cf6d572b145cea0da57c286204554.zip
Get rid of the underscore versions of attribute methods!
This makes me happy!
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/attribute_methods_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index 17cf1ec907..a7cad329e8 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -114,6 +114,11 @@ class AttributeMethodsTest < ActiveRecord::TestCase
assert !topic.respond_to?(:nothingness)
end
+ def test_deprecated_underscore_method
+ topic = Topic.find(1)
+ assert_equal topic.title, assert_deprecated { topic._title }
+ end
+
def test_respond_to_with_custom_primary_key
keyboard = Keyboard.create
assert_not_nil keyboard.key_number