Closed ghost closed 4 years ago
Ahhh, that is because the JSON files are erb fixtures, not plain old json. They should be named <filename>.json.erb
so that it's a bit more clear that they are intended for data to be interpolatable into them.
See:
You can use the compensated_event_body
method defined in the Compensated::Spec::Helpers module to interpolate your own values into the JSON like so:
$ bundle console
> require 'json'
> include Compensated::Spec::Helpers
# => Object
> puts JSON.parse(compensated_event_body('stripe/charge.succeeded.api-v2014-11-05.json'))
You can see examples of this in the feature definition for using fixutres, and there is corresponding code illustrating it in the underying step definitions
Ahh I see. Shall I close this issue and make a PR to rename the files?
@lanegrant that'd be awesome! Thank you!
Not sure what the cause of this was, but alas, an easy fix