X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/effb1b7f4170bb7244c4dfffcbe6134fe00e2bc4..727ee97a3f40f6b6d40546d1417f3a936692b755:/test/test_helper.rb diff --git a/test/test_helper.rb b/test/test_helper.rb index 552bda7d5..7198519a7 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,10 +2,9 @@ require "coveralls" Coveralls.wear!("rails") ENV["RAILS_ENV"] = "test" -require File.expand_path("../../config/environment", __FILE__) +require File.expand_path("../config/environment", __dir__) require "rails/test_help" require "webmock/minitest" -require "minitest/rails/capybara" module ActiveSupport class TestCase @@ -83,7 +82,7 @@ module ActiveSupport ## # set request headers for HTTP basic authentication def basic_authorization(user, pass) - @request.env["HTTP_AUTHORIZATION"] = format("Basic %s", Base64.encode64("#{user}:#{pass}")) + @request.env["HTTP_AUTHORIZATION"] = format("Basic %{auth}", :auth => Base64.encode64("#{user}:#{pass}")) end ##