Remove duplicate test helper

This commit is contained in:
Benjamin Fleischer
2015-09-16 08:49:34 -05:00
parent 610775a95f
commit 26277ea1f9
2 changed files with 20 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ module ActionController
class ImplicitSerializerTest < ActionController::TestCase
include ActiveSupport::Testing::Stream
class ImplicitSerializationTestController < ActionController::Base
include SerializationTesting
def render_using_implicit_serializer
@profile = Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
render json: @profile
@@ -123,21 +124,6 @@ module ActionController
render json: like
end
private
def generate_cached_serializer(obj)
ActiveModel::SerializableResource.new(obj).to_json
end
def with_adapter(adapter)
old_adapter = ActiveModel::Serializer.config.adapter
# JSON-API adapter sets root by default
ActiveModel::Serializer.config.adapter = adapter
yield
ensure
ActiveModel::Serializer.config.adapter = old_adapter
end
end
tests ImplicitSerializationTestController