Prove It Without a Stripe Account

Faking Stripe with plain Minitest β€” no extra gem

There's no Stripe account configured on this machine, and this module never asked you to make one. So how does payments_test.rb prove PaymentsController#create actually calls Stripe::PaymentIntent.create correctly, without a real network call to Stripe's API? Minitest ships a stubbing helper on every Object β€” no extra gem, no webmock, no VCR-style cassette recording. SomeClass.stub(:method_name, return_value) { ... } temporarily replaces method_name with something that just returns return_value, for the duration of the block only, then restores the real method automatically.