Sha256: 0396cb967d005633c9747ec878e234fe6c8eb72ebb924e13997d919b7895697f

Contents?: true

Size: 692 Bytes

Versions: 14

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rspeckled-1.0.3 lib/rspeckled/plugins/stripe.rb
rspeckled-1.0.2 lib/rspeckled/plugins/stripe.rb
rspeckled-1.0.1 lib/rspeckled/plugins/stripe.rb
rspeckled-1.0.0 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.64 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.63 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.62 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.61 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.60 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.59 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.58 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.57 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.56 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.55 lib/rspeckled/plugins/stripe.rb