Skip to content

Commit

Permalink
Remove unneeded-begin block
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Dec 11, 2023
1 parent 29a7d2d commit 6e47f4c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/rspec/openapi/result_recorder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ def record_results!
RSpec::OpenAPI::SchemaMerger.merge!(spec, schema)
new_from_zero = {}
records.each do |record|
begin
record_schema = RSpec::OpenAPI::SchemaBuilder.build(record)
RSpec::OpenAPI::SchemaMerger.merge!(spec, record_schema)
RSpec::OpenAPI::SchemaMerger.merge!(new_from_zero, record_schema)
rescue StandardError, NotImplementedError => e # e.g. SchemaBuilder raises a NotImplementedError
@error_records[e] = record # Avoid failing the build
end
record_schema = RSpec::OpenAPI::SchemaBuilder.build(record)
RSpec::OpenAPI::SchemaMerger.merge!(spec, record_schema)
RSpec::OpenAPI::SchemaMerger.merge!(new_from_zero, record_schema)
rescue StandardError, NotImplementedError => e # e.g. SchemaBuilder raises a NotImplementedError
@error_records[e] = record # Avoid failing the build

Check warning on line 22 in lib/rspec/openapi/result_recorder.rb

View check run for this annotation

Codecov / codecov/patch

lib/rspec/openapi/result_recorder.rb#L22

Added line #L22 was not covered by tests
end
RSpec::OpenAPI::SchemaCleaner.cleanup!(spec, new_from_zero)
RSpec::OpenAPI::ComponentsUpdater.update!(spec, new_from_zero)
Expand Down

0 comments on commit 6e47f4c

Please sign in to comment.