lib/rspec/openapi/minitest_hooks.rb in rspec-openapi-0.14.0 vs lib/rspec/openapi/minitest_hooks.rb in rspec-openapi-0.15.0

- old
+ new

@@ -10,11 +10,11 @@ result = super if ENV['OPENAPI'] && self.class.openapi? file_path = method(name).source_location.first human_name = name.sub(/^test_/, '').gsub('_', ' ') example = Example.new(self, human_name, {}, file_path) - 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 result end @@ -43,8 +43,8 @@ Minitest::Test.prepend RSpec::OpenAPI::Minitest::RunPatch Minitest.after_run do result_recorder = RSpec::OpenAPI::ResultRecorder.new(RSpec::OpenAPI.path_records) result_recorder.record_results! - puts result_record.error_message if result_recorder.errors? + puts result_recorder.error_message if result_recorder.errors? end end