Sha256: 2df19f5a8f0bc4cd72d54adc22b462258d11cad3be3c50d6cf63fa78d77dd3f9

Contents?: true

Size: 534 Bytes

Versions: 3

Compression:

Stored size: 534 Bytes

Contents

module Workarea
  module AuthorizeCimGatewayVCRConfig
    def self.included(test)
      super
      test.setup :setup_gateway
      test.teardown :reset_gateway
    end

    def setup_gateway
      @_old_gateway = Workarea.config.gateways.credit_card
      Workarea.config.gateways.credit_card = ActiveMerchant::Billing::AuthorizeNetCimGateway.new(
        login:    'a',
        password: 'b',
        test:     true
      )
    end

    def reset_gateway
      Workarea.config.gateways.credit_card = @_old_gateway
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
workarea-authorize_cim-2.1.3 test/support/workarea/authorize_cim_gateway_vcr_config.rb
workarea-authorize_cim-2.1.2 test/support/workarea/authorize_cim_gateway_vcr_config.rb
workarea-authorize_cim-2.1.1 test/support/workarea/authorize_cim_gateway_vcr_config.rb