diff options
author | Chris Salzberg <chris@dejimata.com> | 2017-10-09 07:10:00 +0900 |
---|---|---|
committer | Chris Salzberg <chris@dejimata.com> | 2017-10-09 07:10:00 +0900 |
commit | fb800feeea8b9cba38c8f616b8c7814e090b2905 (patch) | |
tree | a0968beb05ee720bf8276cc55e9000992304cec1 /activerecord/test | |
parent | d20f4b73bd65a4c679aa31fb95795148d7799ae7 (diff) | |
download | rails-fb800feeea8b9cba38c8f616b8c7814e090b2905.tar.gz rails-fb800feeea8b9cba38c8f616b8c7814e090b2905.tar.bz2 rails-fb800feeea8b9cba38c8f616b8c7814e090b2905.zip |
Add test for class of GeneratedAttributeMethods instance in ancestors
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 5 |
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 2d67c57cfb..2f42684212 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -999,6 +999,11 @@ class AttributeMethodsTest < ActiveRecord::TestCase assert_equal ["title"], model.accessed_fields end + test "generated attribute methods ancestors have correct class" do + mod = Topic.send(:generated_attribute_methods) + assert_match %r(GeneratedAttributeMethods), mod.inspect + end + private def new_topic_like_ar_class(&block) |