From 49177d5e3be22caec715529e89f8372f492ad2ed Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Tue, 21 May 2024 08:37:44 +0100 Subject: [PATCH] Fix rubocop long line --- .../validation/error_collection_spec.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/spec/lib/openapi3_parser/validation/error_collection_spec.rb b/spec/lib/openapi3_parser/validation/error_collection_spec.rb index c672494..85b58dd 100644 --- a/spec/lib/openapi3_parser/validation/error_collection_spec.rb +++ b/spec/lib/openapi3_parser/validation/error_collection_spec.rb @@ -80,11 +80,15 @@ def create_error(message, error_d, error_e]) - klass = Openapi3Parser::Validation::ErrorCollection::LocationTypeGroup - expect(instance.group_errors).to contain_exactly( - klass.new(error_a.context.source_location, nil, - [error_a, error_b]), klass.new(error_c.context.source_location, nil, [error_c]), klass.new(error_d.context.source_location, "Contact", [error_d]), klass.new(error_e.context.source_location, "Info", [error_e]) - ) + group_class = Openapi3Parser::Validation::ErrorCollection::LocationTypeGroup + + expected = [ + group_class.new(error_a.context.source_location, nil, [error_a, error_b]), + group_class.new(error_c.context.source_location, nil, [error_c]), + group_class.new(error_d.context.source_location, "Contact", [error_d]), + group_class.new(error_e.context.source_location, "Info", [error_e]) + ] + expect(instance.group_errors).to contain_exactly(*expected) end end