diff --git a/spec/lib/gitlab/request_context_spec.rb b/spec/lib/gitlab/request_context_spec.rb index 3ed57c2c916..23e45aff1c5 100644 --- a/spec/lib/gitlab/request_context_spec.rb +++ b/spec/lib/gitlab/request_context_spec.rb @@ -25,7 +25,7 @@ describe Gitlab::RequestContext do [200, {}, ["Hello"]] end - Rails.application.middleware.build(endpoint).call(env) + described_class.new(endpoint).call(env) expect(client_ip).to eq(load_balancer_ip) end