Sha256: 2b3171e231343ba0ee3bfa2b4fa7be310d10f60e328f09d07a28b6908f052747

Contents?: true

Size: 955 Bytes

Versions: 19

Compression:

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

19 entries across 19 versions & 2 rubygems

Version Path
rspectacular-0.70.8 lib/rspectacular/plugins/stripe.rb
rspeckled-0.0.16 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.15 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.14 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.13 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.12 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.11 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.10 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.9 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.8 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.7 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.6 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.5 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.4 lib/rspeckled/plugins/stripe.rb
rspectacular-0.70.7 lib/rspectacular/plugins/stripe.rb
rspeckled-0.0.3 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.2 lib/rspeckled/plugins/stripe.rb
rspeckled-0.0.1 lib/rspeckled/plugins/stripe.rb
rspectacular-0.70.6 lib/rspectacular/plugins/stripe.rb