Sha256: a6e5b5989e9c58f06d3e077dfbfa91af9b518ca6e2329f9163c1a8c5a86a081f

Contents?: true

Size: 510 Bytes

Versions: 49

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe LHC do
  context 'interceptor' do
    before(:each) do
      class SomeInterceptor < LHC::Interceptor
        def after_request; end
      end
      LHC.configure { |c| c.interceptors = [SomeInterceptor] }
    end

    it 'can perform some actions after a request was fired' do
      expect_any_instance_of(SomeInterceptor).to receive(:after_request)
      stub_request(:get, 'http://local.ch')
      LHC.get('http://local.ch')
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
lhc-15.2.1 spec/interceptors/after_request_spec.rb
lhc-15.2.0 spec/interceptors/after_request_spec.rb
lhc-15.1.3 spec/interceptors/after_request_spec.rb
lhc-15.1.2 spec/interceptors/after_request_spec.rb
lhc-15.1.1 spec/interceptors/after_request_spec.rb
lhc-15.1.0 spec/interceptors/after_request_spec.rb
lhc-16.0.0.pre.pro2162.2 spec/interceptors/after_request_spec.rb
lhc-16.0.0.pre.pro2162 spec/interceptors/after_request_spec.rb
lhc-15.0.1 spec/interceptors/after_request_spec.rb
lhc-15.0.0 spec/interceptors/after_request_spec.rb
lhc-14.0.0 spec/interceptors/after_request_spec.rb
lhc-13.4.0.pre.pro1766.1 spec/interceptors/after_request_spec.rb
lhc-13.2.0 spec/interceptors/after_request_spec.rb
lhc-13.1.0 spec/interceptors/after_request_spec.rb
lhc-13.0.0 spec/interceptors/after_request_spec.rb
lhc-12.3.0 spec/interceptors/after_request_spec.rb
lhc-12.2.1 spec/interceptors/after_request_spec.rb
lhc-12.2.0 spec/interceptors/after_request_spec.rb
lhc-12.1.3 spec/interceptors/after_request_spec.rb
lhc-12.1.2 spec/interceptors/after_request_spec.rb