mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Sets flag to create folder with Stripe version
This commit is contained in:
committed by
Maikel Linke
parent
cbc2ef54c8
commit
7dac08a0be
@@ -131,6 +131,21 @@ RSpec.configure do |config|
|
||||
end
|
||||
end
|
||||
|
||||
# Appends Stripe gem version to VCR cassette directory with ':stripe_version' flag
|
||||
#
|
||||
# When the Stripe gem is updated, we should re-record these cassettes:
|
||||
#
|
||||
# rm spec/fixtures/vcr_cassettes/Stripe-v* -r
|
||||
# ./bin/rspec --tag stripe_version
|
||||
config.around(:each, :stripe_version) do |example|
|
||||
stripe_version = "Stripe-v#{Stripe::VERSION}"
|
||||
VCR.configure do |vcr_config|
|
||||
vcr_config.cassette_library_dir = "spec/fixtures/vcr_cassettes/#{stripe_version}"
|
||||
vcr_config.default_cassette_options = { record: :none } if ENV["CI"]
|
||||
end
|
||||
example.run
|
||||
end
|
||||
|
||||
# Geocoding
|
||||
config.before(:each) {
|
||||
allow_any_instance_of(Spree::Address).to receive(:geocode).and_return([1, 1])
|
||||
|
||||
Reference in New Issue
Block a user