Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use generated API responses in stripe-ruby tests
This patch introduces a narrow working slice of tests that use data generated from within the API itself to produce sample responses from a stubbed out API in the test suite. This has a few advantages over the current situation: * More accurate test data back from the stub. The current `TestData` system is extremely prone to eroding (this is the biggest advantage). * Basic validation gets run on incoming request parameters. * Stubbing is run at a lower level (the HTTP library instead of the `Stripe` module) so we get a little more certainty that things work as expected. * Contributing new tests (especially for new resources) becomes very easy because no sections of `TestData` are required. Replacing the entire suite will take a few hours and involving a lot of copy and pasting, but is entirably doable and after we're done we can remove the entire `TestData` module and the monkey patching on the `Stripe` module.
- Loading branch information