Skip to content

Instantly share code, notes, and snippets.

@s-mage
Last active August 30, 2017 11:29
Show Gist options
  • Save s-mage/7274a49bcfe33c5e5699e207508b9219 to your computer and use it in GitHub Desktop.
Save s-mage/7274a49bcfe33c5e5699e207508b9219 to your computer and use it in GitHub Desktop.
[Log] VCR ignores cached responses after first re-record
# re_record_time: 10.minutes
# Time: 11:57
# VCR records requests first time
$ bundle exec rspec ./spec/features/market/job_offer_spec.rb
Job Offer
to a hourly job
company
VCR GET: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm
VCR POST: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm/sources
VCR POST: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm
VCR GET: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm/sources/card_1AwS2tKHGzpThXUSUI2QK1lZ
is allowed to send an offer from experts#index
Finished in 46.88 seconds (files took 12.9 seconds to load)
1 example, 0 failures
# Time: 12:00
# No requests to api.stripe.com as expected
$ bundle exec rspec ./spec/features/market/job_offer_spec.rb
Job Offer
to a hourly job
company
is allowed to send an offer from experts#index
Finished in 41.71 seconds (files took 12.74 seconds to load)
1 example, 0 failures
# Time: 12:10
# VCR re-records requests as re_record_interval passed
$ bundle exec rspec ./spec/features/market/job_offer_spec.rb
Job Offer
to a hourly job
company
VCR GET: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm
VCR POST: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm/sources
VCR POST: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm
VCR GET: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm/sources/card_1AwSDiKHGzpThXUSlv0Db1dV
is allowed to send an offer from experts#index
Finished in 45.32 seconds (files took 12.62 seconds to load)
1 example, 0 failures
# Time: 12:12
# BUG: VCR re-records requests despite they already have been recorded 2 minutes ago
$ bundle exec rspec ./spec/features/market/job_offer_spec.rb
Job Offer
to a hourly job
company
VCR GET: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm
VCR POST: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm/sources
VCR POST: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm
VCR GET: https://api.stripe.com/v1/customers/cus_BJ3toXQ39RNwHm/sources/card_1AwSErKHGzpThXUShMtfcBHl
is allowed to send an offer from experts#index
Finished in 43.58 seconds (files took 12.04 seconds to load)
1 example, 0 failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment