minitest-rails-capybara icon indicating copy to clipboard operation
minitest-rails-capybara copied to clipboard

Support for Capybara 3.x

Open manuelmeurer opened this issue 7 years ago • 8 comments

Hey, thanks for writing this fantastic gem! 😄 Are there any plans to support Capybara v3? I tried simply updating the dependency (und patching minitest-capybara to support Capybara v3 as well) and it worked fine. If you could point me into the right direction to what would need to be done to support Cabybara v3, I'd be happy to work on it!

manuelmeurer avatar Apr 12 '18 15:04 manuelmeurer

I tried simply updating the dependency (und patching minitest-capybara to support Capybara v3 as well) and it worked fine.

Do you have a fork I could use or refer to for how to do this? Thanks.

MrHubble avatar Apr 13 '18 06:04 MrHubble

Slightly related to this; If you have this in your Gemfile:

gem 'minitest-rails-capybara'
gem 'capybara'

(without specifying versions) and do a bundle update then your version of minitest-rails-capybara will drop down to version 0.0.2, being the most recent version that claims to support any version of capybara. The latest version is pinned to ~> 2.7.

I don't know what the correct solution is here.

jrmhaig avatar Apr 13 '18 14:04 jrmhaig

@jrmhaig That sounds more like an issue with Bundler than with this gem to me.

@MrHubble Sure, here's my fork: https://github.com/krautcomputing/minitest-rails-capybara/tree/2.x_with_capybara_3

manuelmeurer avatar Apr 13 '18 15:04 manuelmeurer

Yes and no. Bundler will try to find the most recent version of all gems that satisfy all dependencies. It is therefore possible, according to the definitions of the gems, to upgrade capybara by downgrading minitest-rails-capybara to 0.0.2. This, I believe, is the correct behaviour for Bundler.

By the way, I hope I am not coming across as being awkward or argumentative. I very much appreciate the work that has gone into this gem and I do not think this is a major problem. However, I thought it was worth pointing out as some users may encounter problems as a result.

jrmhaig avatar Apr 13 '18 15:04 jrmhaig

Perhaps this gem is no longer actively maintained because Rails 5.1 has system tests (with Capybara) baked in? I believe the author of The Minitest Cookbook uses the default system tests setup:

So far I’m loving this combination of (no) setup and (more) features that system tests provide. If you’ve read about my previous setup based on minitest-rails-capybara in The Minitest Cookbook, let me be clear: this is my new jam, and I’ll be shipping an update to the book sometime after Rails 5.1 officially ships that covers system tests.

https://chriskottom.com/blog/2017/04/full-stack-testing-with-rails-system-tests/

MrHubble avatar Apr 14 '18 02:04 MrHubble

Ah, good to know! I'm stuck with my app on Rails 4.2 for a while, so it would be great to be able to use Capybara v3 with this gem. @blowmage What do you think?

manuelmeurer avatar Apr 17 '18 18:04 manuelmeurer

@manuelmeurer, I'm currently using your fork to support capybara 3 with Rails 4.2. Thanks!

CyborgMaster avatar Jun 01 '19 00:06 CyborgMaster

@CyborgMaster Glad it works for you! 😄

manuelmeurer avatar Jun 03 '19 08:06 manuelmeurer