Skip to content

Commit

Permalink
Move the errors classes to the top of file
Browse files Browse the repository at this point in the history
  • Loading branch information
maurogeorge committed Dec 23, 2015
1 parent 7bd2361 commit aa9b118
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/active_model_serializers/test/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

0 comments on commit aa9b118

Please sign in to comment.