New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix an issue where driven_by(:selenium) is always called #2188
Fix an issue where driven_by(:selenium) is always called #2188
Conversation
👋 Hi, thanks for this, unfortunately If you want to prevent RSpec from calling it again, I'd accept a PR that allows configuring a default driver and using that default value, but I believe this needs to be not lazily loaded. |
Because the before process defined in SystemExampleGroup is executed before the use defined before process, driven_by(:selenium) is always executed. This commit fixes to check the driver configuration at the end of before hooks.
41a607e
to
850f450
Compare
Thanks for your reviews. I rewrote the code to check the driver at the end of before hooks. |
I also created a pull request (rails/rails#37476) to make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for asking to reconsider the implementation.
Wondering if like this approach and it works for your case.
…_driver Fix an issue where driven_by(:selenium) is always called
Because the before process defined in SystemExampleGroup is executed
before the use defined before process, driven_by(:selenium) is always
executed.
This commit fixes the driver configuration to be lazy.