I am trying to mock out Stripe::Charge.create in my specs. (I know about stripe-ruby-mock, but I want to just mock it myself).
This is my code to mock:
expect_any_instance_of(Stripe::Charge).to receive(:create)
When I call my service object which calls Stripe::Charge
in my specs I get this error message:
Failure/Error: expect_any_instance_of(Stripe::Charge).to receive(:create)
Stripe::Charge does not implement #create
Aucun commentaire:
Enregistrer un commentaire