Rename ArraySerializer to CollectionSerializer for clarity

This commit is contained in:
Benjamin Fleischer
2015-10-07 05:07:00 -05:00
parent 737784c9b7
commit 2c8b9b796d
19 changed files with 213 additions and 148 deletions

View File

@@ -19,7 +19,7 @@ module ActiveModel
@second_post.author = @author
@author.posts = [@first_post, @second_post]
@serializer = ArraySerializer.new([@first_post, @second_post])
@serializer = CollectionSerializer.new([@first_post, @second_post])
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer)
ActionController::Base.cache_store.clear
end

View File

@@ -45,7 +45,7 @@ module ActiveModel
end
def test_include_multiple_posts_and_linked_array
serializer = ArraySerializer.new([@first_post, @second_post])
serializer = CollectionSerializer.new([@first_post, @second_post])
adapter = ActiveModel::Serializer::Adapter::JsonApi.new(
serializer,
include: [:comments, author: [:bio]]
@@ -226,7 +226,7 @@ module ActiveModel
end
def test_multiple_references_to_same_resource
serializer = ArraySerializer.new([@first_comment, @second_comment])
serializer = CollectionSerializer.new([@first_comment, @second_comment])
adapter = ActiveModel::Serializer::Adapter::JsonApi.new(
serializer,
include: [:post]