Skip to content

Commit

Permalink
Merge pull request #11963 from filipefurtad0/stripe_payment_status_sp…
Browse files Browse the repository at this point in the history
…ec_vcr

Tests app/services/stripe_payment_status.rb
  • Loading branch information
mkllnk authored Jan 2, 2024
2 parents 5c4dcf3 + 59ad2cf commit 1f0c5fc
Show file tree
Hide file tree
Showing 7 changed files with 2,139 additions and 14 deletions.
12 changes: 11 additions & 1 deletion spec/base_spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,21 @@
#
config.around(:each, :stripe_version) do |example|
stripe_version = "Stripe-v#{Stripe::VERSION}"
cassette_library_dir, default_cassette_options = nil, nil

VCR.configure do |vcr_config|
vcr_config.cassette_library_dir = "spec/fixtures/vcr_cassettes/#{stripe_version}"
cassette_library_dir = vcr_config.cassette_library_dir
default_cassette_options = vcr_config.default_cassette_options
vcr_config.cassette_library_dir += "/#{stripe_version}"
vcr_config.default_cassette_options = { record: :none } if ENV["CI"]
end

example.run

VCR.configure do |vcr_config|
vcr_config.cassette_library_dir = cassette_library_dir
vcr_config.default_cassette_options = default_cassette_options
end
end

# Geocoding
Expand Down
Loading

0 comments on commit 1f0c5fc

Please sign in to comment.