test/test_marlowe.rb in marlowe-2.1 vs test/test_marlowe.rb in marlowe-3.0
- old
+ new
@@ -7,10 +7,11 @@
attr_reader :marlowe_options
def setup
@marlowe_options = {}
+ Marlowe::Config.send(:clear_global!)
end
def app
options = marlowe_options
Rack::Builder.new do
@@ -83,10 +84,10 @@
assert_equal last_response.header["X-Request-Id"], last_response.body
assert_equal "eulav+tset", last_response.header["X-Request-Id"]
end
def test_handler_config_with_proc_handler_returning_nil
- marlowe_options[:handler] = ->(item) {}
+ marlowe_options[:handler] = ->(_item) {}
get "/", {}, {"HTTP_X_REQUEST_ID" => "test+value"}
assert last_response.header.key?("X-Request-Id")
refute_empty last_response.header["X-Request-Id"]
assert_equal last_response.header["X-Request-Id"], last_response.body
assert_match(/\A[-\w]+\z/, last_response.header["X-Request-Id"])