lib/rspec/openapi/minitest_hooks.rb in rspec-openapi-0.12.0 vs lib/rspec/openapi/minitest_hooks.rb in rspec-openapi-0.13.0
- old
+ new
@@ -8,10 +8,10 @@
module RunPatch
def run(*args)
result = super
if ENV['OPENAPI'] && self.class.openapi?
file_path = method(name).source_location.first
- human_name = name.sub(/^test_/, '').gsub(/_/, ' ')
+ 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 }
record = RSpec::OpenAPI::RecordBuilder.build(self, example: example)
RSpec::OpenAPI.path_records[path] << record if record
end