thoughtbot / fake_stripe

A Stripe fake so that you can avoid hitting Stripe servers in tests.
MIT License
401 stars 78 forks source link

v0.2.0 only supports Capybara v3 #96

Closed cllns closed 1 month ago

cllns commented 5 years ago

We had Capybara v2 installed and running FakeStripe.stub_stripe caused a Capybara error about getaddrinfo.

I'm guessing this was due to https://github.com/thoughtbot/fake_stripe/pull/88. I think there should be a version restriction on Capybara to be v3+ in this gemspec.

I'd open that PR but I don't have the time right now to make sure that's exactly the problem (and the right fix).

victorhazbun commented 5 years ago

@cllns The Gem.lock shows it has Capybara v3+ on the tag v.0.2.0 https://github.com/thoughtbot/fake_stripe/blob/v0.2.0/Gemfile.lock

cllns commented 5 years ago

That Gemfile.lock isn't included in the gem distribution (and it shouldn't) be: https://github.com/thoughtbot/fake_stripe/blob/v0.2.0/fake_stripe.gemspec#L14 You can also see this with gem open fake_stripe (or bundle open stripe), there's no Gemfile.lock.

The Gemfile.lock specifying Capybara v3 makes sense, since it shows that CI passes with v3. What I'd propose is adding ~> 3.0 (or whatever minor version is desired) here: https://github.com/thoughtbot/fake_stripe/blob/v0.2.0/fake_stripe.gemspec#L16

@victorhazbun More on how *.gemspec vs Gemfile.lock. The author suggests not checking in the Gemfile.lock, but the most important part is that it's not included in the distribution: https://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/

stefannibrasil commented 1 month ago

Closing this because fake_stripe has been deprecated: https://github.com/thoughtbot/fake_stripe/pull/154