Sha256: 9fc60af9b801e856688edf027420e7ef2d38b4385e1eb5d85ea974d0d0f2d6b5

Contents?: true

Size: 984 Bytes

Versions: 15

Compression:

Stored size: 984 Bytes

Contents

##############################################################################
#                               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|
          if plan.id.match(/test/i) || plan.name.match(/test/i)
            plan.delete
          end
        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

15 entries across 15 versions & 1 rubygems

Version Path
rspectacular-0.62.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.61.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.60.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.59.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.58.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.57.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.56.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.55.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.54.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.53.1 lib/rspectacular/plugins/stripe.rb
rspectacular-0.53.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.52.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.51.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.50.0 lib/rspectacular/plugins/stripe.rb
rspectacular-0.49.0 lib/rspectacular/plugins/stripe.rb