Skip to content

Commit

Permalink
Remove unneeded-begin block (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego authored Dec 11, 2023
1 parent 29a7d2d commit 1d3dccc
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
end
RSpec::OpenAPI::SchemaCleaner.cleanup!(spec, new_from_zero)
RSpec::OpenAPI::ComponentsUpdater.update!(spec, new_from_zero)
Expand Down

0 comments on commit 1d3dccc

Please sign in to comment.