How to use fake_braintree for testing a rails app given that non-test code hits the actual Braintree API -


i'm having trouble testing braintree rails app using fake_braintree. i'm not using rspec, , maybe part of problem.

in tests, interact fakebraintree---adding customers there, etc... in non-test code, pull data braintree api itself. thus, when tests hits non-tests code, code connects braintree sandbox, (of course) customer created via fakebraintree not there. doesn't seem me want atypical, , i'm unclear how should using fake_braintree, , having trouble finding clear documentation. maybe problem trying without using rspec?

thanks!

i came after time, , solution surprising (or me @ least). if test environment has access braintree sandbox, connects there rather fake_braintree. in order tests fake_braintree work, had reconfigure configurations braintree configuration variables not set test environment.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -