File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,15 @@ Feature: System specs
1919
2020 RSpec **does not** use your `ApplicationSystemTestCase` helper. Instead it
2121 uses the default `driven_by(:selenium)` from Rails. If you want to override
22- this behaviour you can call `driven_by` manually in a test.
22+ this behaviour you can call `driven_by` manually in a test. Alternatively,
23+ if you want to specify a default driver for all system specs (rather than
24+ using `driven_by` in every spec), add the following to `spec/rails_helper.rb`:
25+
26+ ```
27+ config.before(type: :system) do
28+ driven_by :selenium_headless # Or your preferred default driver
29+ end
30+ ```
2331
2432 System specs run in a transaction. So unlike feature specs with
2533 javascript, you do not need [DatabaseCleaner](https://github.com/DatabaseCleaner/database_cleaner).
You can’t perform that action at this time.
0 commit comments