module ActiveModel::Serializer::Lint::Tests
def test_as_json
which includes ActiveModel::Serializers::JSON.
Typically, it is implemented either by including ActiveModel::Serialization
It may delegate to serializable_hash
as_json returns a hash representation of a serialized object.
Fails otherwise.
zero or one arguments.
Passes if the object responds to as_json and if it takes
def test_as_json assert_respond_to resource, :as_json resource.as_json resource.as_json(nil) end