File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,21 @@ 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 need to call `driven_by` in your specs.
23+
24+ This can either be done manually in the spec files themselves or
25+ you can use the configuration helpers to do this for every system spec,
26+ for example by adding the following to `spec/rails_helper.rb`:
27+
28+ ```ruby
29+ RSpec.configure do |config|
30+ ...
31+ config.before(type: :system) do
32+ driven_by :selenium_headless # Or your preferred default driver
33+ end
34+ ...
35+ end
36+ ```
2337
2438 System specs run in a transaction. So unlike feature specs with
2539 javascript, you do not need [DatabaseCleaner](https://github.com/DatabaseCleaner/database_cleaner).
You can’t perform that action at this time.
0 commit comments