From aa9b11883281a83dacbc2ae732357af64a172a99 Mon Sep 17 00:00:00 2001 From: Mauro George Date: Wed, 23 Dec 2015 18:57:54 -0200 Subject: [PATCH] Move the errors classes to the top of file --- lib/active_model_serializers/test/schema.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/active_model_serializers/test/schema.rb b/lib/active_model_serializers/test/schema.rb index 150488734..42d5255fb 100644 --- a/lib/active_model_serializers/test/schema.rb +++ b/lib/active_model_serializers/test/schema.rb @@ -16,6 +16,9 @@ def assert_response_schema(schema_path = nil, message = nil) assert(matcher.call, matcher.message) end + MissingSchema = Class.new(Errno::ENOENT) + InvalidSchemaError = Class.new(StandardError) + class AssertResponseSchema attr_reader :schema_path, :response, :message @@ -90,9 +93,6 @@ def load_json_file(path) raise MissingSchema, "No Schema file at #{schema_full_path}" end end - - MissingSchema = Class.new(Errno::ENOENT) - InvalidSchemaError = Class.new(StandardError) end end end