Sha256: b3d3c58392fcb03e33e2048f1a72e3fe26c7bdb8a5a18c99670526a09a6b5171

Contents?: true

Size: 985 Bytes

Versions: 14

Compression:

Stored size: 985 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

14 entries across 14 versions & 1 rubygems

Version Path
rspeckled-0.0.30 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.29 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.28 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.27 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.26 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.25 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.24 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.23 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.22 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.21 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.20 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.19 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.18 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.17 lib/rspeckled/plugins/stripe.rb