lib/opentelemetry/instrumentation/rspec/formatter.rb in opentelemetry-instrumentation-rspec-0.3.1 vs lib/opentelemetry/instrumentation/rspec/formatter.rb in opentelemetry-instrumentation-rspec-0.3.2
- old
+ new
@@ -3,11 +3,11 @@
# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0
require 'opentelemetry-api'
-require_relative './version'
+require_relative 'version'
module OpenTelemetry
module Instrumentation
module RSpec
# An RSpec Formatter that outputs Otel spans
@@ -119,10 +119,10 @@
def strip_console_codes(string)
string.gsub(/\e\[([;\d]+)?m/, '')
end
def multiple_failure_message(exception)
- exception.failures.map(&:message).map(&method(:strip_console_codes)).join("\n\n")
+ exception.failures.map(&:message).map { |x| strip_console_codes(x) }.join("\n\n")
end
end
end
end
end