diff options
author | Lauro Caetano <laurocaetano1@gmail.com> | 2014-04-14 00:04:08 -0300 |
---|---|---|
committer | Lauro Caetano <laurocaetano1@gmail.com> | 2014-04-14 00:04:08 -0300 |
commit | a16f33045ae6fac1ba66980bb0a2b0b1e5847103 (patch) | |
tree | 15954f81fa2f8234fe8372b7e4a8c53c57265e94 /activerecord/test/cases/attribute_methods_test.rb | |
parent | af549a1ad6692d7e2c756750651f0e1b293f5185 (diff) | |
download | rails-a16f33045ae6fac1ba66980bb0a2b0b1e5847103.tar.gz rails-a16f33045ae6fac1ba66980bb0a2b0b1e5847103.tar.bz2 rails-a16f33045ae6fac1ba66980bb0a2b0b1e5847103.zip |
Just call read_attribute, no need to use `send`.
Follow up to af549a1ad6692d7e2c756750651f0e1b293f5185
Diffstat (limited to 'activerecord/test/cases/attribute_methods_test.rb')
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index 952baaca36..38e93288e4 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -288,10 +288,10 @@ class AttributeMethodsTest < ActiveRecord::TestCase def test_read_attribute topic = Topic.new topic.title = "Don't change the topic" - assert_equal "Don't change the topic", topic.send(:read_attribute, "title") + assert_equal "Don't change the topic", topic.read_attribute("title") assert_equal "Don't change the topic", topic["title"] - assert_equal "Don't change the topic", topic.send(:read_attribute, :title) + assert_equal "Don't change the topic", topic.read_attribute(:title) assert_equal "Don't change the topic", topic[:title] end @@ -358,10 +358,10 @@ class AttributeMethodsTest < ActiveRecord::TestCase super(attr_name).upcase end - assert_equal "STOP CHANGING THE TOPIC", topic.send(:read_attribute, "title") + assert_equal "STOP CHANGING THE TOPIC", topic.read_attribute("title") assert_equal "STOP CHANGING THE TOPIC", topic["title"] - assert_equal "STOP CHANGING THE TOPIC", topic.send(:read_attribute, :title) + assert_equal "STOP CHANGING THE TOPIC", topic.read_attribute(:title) assert_equal "STOP CHANGING THE TOPIC", topic[:title] end |