Sha256: 37794e0419448e85fbc455ad25dad20cb76bbfe3042c3db37cfb162b8eab8dd4

Contents?: true

Size: 986 Bytes

Versions: 24

Compression:

Stored size: 986 Bytes

Contents

# frozen_string_literal: true

##############################################################################
#                               Stripe Plugin
##############################################################################

begin
  require 'stripe'

  RSpec.configure do |config|
    config.after(:each, :stripe => true) do
      if defined?(VCR)
        vcr_turned_on = VCR.turned_on?
        VCR.turn_off!
      end

      if defined?(WebMock)
        webmock_net_connect = WebMock.net_connect_allowed?
        WebMock.allow_net_connect!
      end

      begin
        Stripe::Plan.all(:count => 100).each do |plan|
          plan.delete if plan.id.match(/test/i) || plan.name.match(/test/i)
        end

        Stripe::Customer.all(:count => 100).each(&:delete)
      ensure
        VCR.turn_on!                if defined?(VCR) && vcr_turned_on
        WebMock.allow_net_connect!  if defined?(WebMock) && webmock_net_connect
      end
    end
  end
rescue LoadError
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rspeckled-0.0.54 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.53 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.52 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.51 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.50 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.49 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.48 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.47 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.46 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.45 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.44 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.43 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.42 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.41 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.40 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.39 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.38 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.37 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.36 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.35 lib/rspeckled/plugins/stripe.rb