diff options
Diffstat (limited to 'spec/lib/gitlab/request_context_spec.rb')
-rw-r--r-- | spec/lib/gitlab/request_context_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/gitlab/request_context_spec.rb b/spec/lib/gitlab/request_context_spec.rb index cde12d4b310..87b8029de2e 100644 --- a/spec/lib/gitlab/request_context_spec.rb +++ b/spec/lib/gitlab/request_context_spec.rb @@ -43,7 +43,9 @@ describe Gitlab::RequestContext do let(:ip) { '192.168.1.11' } before do - allow_any_instance_of(Rack::Request).to receive(:ip).and_return(ip) + allow_next_instance_of(Rack::Request) do |instance| + allow(instance).to receive(:ip).and_return(ip) + end described_class.new(app).call(env) end |