Search code examples
ruby-on-railstestingbraintree

Testing Braintree Transparent Redirect for Rails App


I'm using Braintree Transparent Redirect to take payment info and create subscriptions that are stored with Braintree. What are best practices for testing the controller that interacts with Braintree? It seems like a lot of trouble to create a new customer and subscription in the Braintree sandbox every time I run my test. I'm using Rspec if that matters at all.


Solution

  • If you're still interested in using Rspec, check out the braintree ruby examples on github. All the tests are rspec, and there are lots of examples you can use.

    https://github.com/braintree/braintree_ruby_examples