Skip to content

Commit b1dff4b

Browse files
olleolleolleSam Phippen
authored andcommitted
[DOC] System spec feature more verbose (#2052)
1 parent aef8da0 commit b1dff4b

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

features/system_specs/system_specs.feature

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
Feature: System spec
22

33
System specs are RSpec's wrapper around Rails' own
4-
[system tests](http://guides.rubyonrails.org/testing.html#system-testing).
5-
We encourage you to familiarize yourself with their documentation.
4+
[system tests](https://guides.rubyonrails.org/testing.html#system-testing).
65

7-
RSpec **does not** use your `ApplicationSystemTestCase` helper. Instead it uses
8-
the default `driven_by(:selenium)` from Rails. If you want to override this
9-
behaviour you can call `driven_by` manually in a test.
6+
> System tests allow you to test user interactions with your application,
7+
> running tests in either a real or a headless browser. System tests use
8+
> Capybara under the hood.
9+
>
10+
> By default, system tests are run with the Selenium driver, using the
11+
> Chrome browser, and a screen size of 1400x1400. The next section explains
12+
> how to change the default settings.
1013

14+
System specs are marked by setting type to :system, e.g. `:type => :system`.
15+
16+
The Capybara gem is automatically required, and Rails includes it in
17+
generated application Gemfiles. Configure a webserver (e.g.
18+
`Capybara.server = :webrick`) before attempting to use system specs.
19+
20+
RSpec **does not** use your `ApplicationSystemTestCase` helper. Instead it
21+
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.
23+
24+
System specs run in a transaction. So unlike feature specs with
25+
javascript, you do not need [DatabaseCleaner](https://github.com/DatabaseCleaner/database_cleaner).
1126

1227
@system_test
1328
Scenario: System specs

0 commit comments

Comments
 (0)