Closed codemang closed 4 years ago
Actually looking through the docs more, I see there is a c.before_handle_request
option, where you can mutate the body before it's saved to the cache. Is the pattern then to look through each request and identify attributes that can change slightly over time, and overwrite them with hardcoded, mock data?
use_ignore_params
is default true so you shouldn't need to define that.
Looks like you just need to add the path /4
to your ignore_params
array. Give that a shot and report back.
My understanding of things have changed, I'm going to open a new question with more information.
I'm testing a Rails backend and React frontend app. We're using the Stripe React library and trying to use PuffingBilly to record the requests between our frontend and the stripe backend.
I'm noticing that each time we run the specs, we have new requests being recorded. I believe this is because our spec is not ignoring parameters in the requests correctly, even though I configured PuffingBilly to do so.
As an example, here is a request that gets recorded on the first spec run:
When I run it a second time, it records a new request that looks like this:
It looks as if the only thing that's different is the
body
field. Is there any way to ignore that?Here is my config: