Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (21 sloc) 826 Bytes

fake_braintree, a Braintree fake

Currently in alpha.

Quick start

Call FakeBraintree.activate! to make it go. FakeBraintree.clear! will clear all data, which you probably want to do before each test.

Example, in spec_helper.rb:


RSpec.configure do |c|
  c.before do

Verifying credit cards

To verify every credit card you try to use, call:


This will stay "on" until you set

FakeBraintree.verify_all_cards = false

Calling FakeBraintree.clear! will not change this setting. It does very basic verification: it only matches the credit card number against these: and rejects them if they aren't one of the listed numbers.

Jump to Line
Something went wrong with that request. Please try again.