Sha256: d77c32ce34386ec48ce5a5800f115e867460d72f363cfc4842606a5fbc96812b
Contents?: true
Size: 493 Bytes
Versions: 49
Compression:
Stored size: 493 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe LHC do context 'interceptor' do before(:each) do class TrackingIdInterceptor < LHC::Interceptor def before_request request.params[:tid] = 123 end end LHC.configure { |c| c.interceptors = [TrackingIdInterceptor] } end it 'can modify requests before they are send' do stub_request(:get, "http://local.ch/?tid=123") LHC.get('http://local.ch') end end end
Version data entries
49 entries across 49 versions & 1 rubygems