lib/fake_stripe.rb in fake_stripe-0.0.12 vs lib/fake_stripe.rb in fake_stripe-0.1.0
- old
+ new
@@ -30,11 +30,11 @@
end
def self.stub_stripe
Stripe.api_key = 'FAKE_STRIPE_API_KEY'
FakeStripe.reset
+ FakeStripe::StubStripeJS.boot_once
stub_request(:any, /api.stripe.com/).to_rack(FakeStripe::StubApp)
end
end
-server = FakeStripe::StubStripeJS.boot
-STRIPE_JS_HOST = "http://#{server.host}:#{server.port}"
+STRIPE_JS_HOST = "http://localhost:#{FakeStripe::StubStripeJS.server_port}"