lib/rspec/request_describer.rb in rspec-request_describer-0.5.0 vs lib/rspec/request_describer.rb in rspec-request_describer-0.6.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'rspec/request_describer/version' module RSpec module RequestDescriber class IncorrectDescribe < StandardError; end @@ -54,10 +56,10 @@ end let(:env) do headers.inject({}) do |result, (key, value)| key = key.to_s - key = 'HTTP_' + key unless RESERVED_HEADER_NAMES.include?(key.downcase) + key = "HTTP_#{key}" unless RESERVED_HEADER_NAMES.include?(key.downcase) key = key.tr('-', '_').upcase result.merge(key => value) end end