diff --git a/test/unit/active_model/serializer/has_many_test.rb b/test/unit/active_model/serializer/has_many_test.rb index a64562cf..77e27875 100644 --- a/test/unit/active_model/serializer/has_many_test.rb +++ b/test/unit/active_model/serializer/has_many_test.rb @@ -86,7 +86,7 @@ module ActiveModel CONFIG.embed = :ids CONFIG.include = true - PostSerializer._associations[:comments].send :initialize, @association.name, @association.options + @association.send :initialize, @association.name, @association.options assert_equal({ 'post' => { title: 'Title 1', body: 'Body 1', 'comment_ids' => @post.comments.map { |c| c.object_id } }, @@ -100,7 +100,7 @@ module ActiveModel CONFIG.embed = nil CONFIG.include = true - PostSerializer._associations[:comments].send :initialize, @association.name, @association.options + @association.send :initialize, @association.name, @association.options assert_equal({ 'post' => { title: 'Title 1', body: 'Body 1' },