module ActiveModelSerializers::Test::Schema

def assert_response_schema(schema_path = nil, message = nil)

Returns:
  • (Minitest::Assertion) - when the response is invalid
  • (Boolean) - true when the response is valid

Parameters:
  • message (String) -- a custom error message
  • schema_path (String) -- a custom schema path
def assert_response_schema(schema_path = nil, message = nil)
  matcher = AssertResponseSchema.new(schema_path, response, message)
  assert(matcher.call, matcher.message)
end