Add option to rspec:install generator to configure for Selenium in Docker #2878 #2886
Open
nicolasva wants to merge 2 commits intorspec:mainfrom
Open
Add option to rspec:install generator to configure for Selenium in Docker #2878
#2886nicolasva wants to merge 2 commits intorspec:mainfrom
nicolasva wants to merge 2 commits intorspec:mainfrom
Conversation
JonRowe
requested changes
Feb 27, 2026
Member
JonRowe
left a comment
There was a problem hiding this comment.
Thanks for tackling this, I'd like to see some improvements to the specs but otherwise this is fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issue : #2878
changes :
4 files modified/created:
class_option :selenium_container (string, nil by default)
Public method copy_system_test_configuration that generates the support file when the option is provided
Private helper selenium_container
served_by + remote driven_by when CAPYBARA_SERVER_PORT is set (Docker mode)
Fallback to driven_by :selenium, using: :headless_chrome locally
File generation when option is provided
Container hostname, served_by, remote driven_by, local fallback
Custom hostname (e.g. --selenium-container=chrome)
No file generated without the option
Usage:
rails generate rspec:install --selenium-container=selenium
Then uncomment the spec/support/**/*.rb glob in rails_helper.rb to auto-load the configuration.