lib/rspec/openapi/rspec_hooks.rb in rspec-openapi-0.14.0 vs lib/rspec/openapi/rspec_hooks.rb in rspec-openapi-0.15.0
- old
+ new
@@ -2,10 +2,10 @@
require 'rspec/core'
RSpec.configuration.after(:each) do |example|
if RSpec::OpenAPI.example_types.include?(example.metadata[:type]) && example.metadata[:openapi] != false
- path = RSpec::OpenAPI.path.yield_self { |p| p.is_a?(Proc) ? p.call(example) : p }
+ path = RSpec::OpenAPI.path.then { |p| p.is_a?(Proc) ? p.call(example) : p }
record = RSpec::OpenAPI::RecordBuilder.build(self, example: example)
RSpec::OpenAPI.path_records[path] << record if record
end
end