This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rack::Test doesn't support hitting external webservers. However, when a user enters their credit card info, | |
# it is submitted directly to braintree, so we need to intregration test with hitting an external server. | |
# This hack enabled this, by swapping out the Rack::Test's rack app with a Rack::Client instance. | |
# Rack::Client acts just like a rack app, but under the covers it delegates to Net::HTTP. | |
require 'rack/client' | |
module RackTestHack | |
def new(*a, &b) |
NewerOlder