Skip to content

System Spec feature: include System Tests text #2052

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions features/system_specs/system_specs.feature
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
Feature: System spec

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

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

System specs are marked by setting type to :system, e.g. `:type => :system`.

The Capybara gem is automatically required, and Rails includes it in
generated application Gemfiles. Configure a webserver (e.g.
`Capybara.server = :webrick`) before attempting to use system specs.

RSpec **does not** use your `ApplicationSystemTestCase` helper. Instead it
uses the default `driven_by(:selenium)` from Rails. If you want to override
this behaviour you can call `driven_by` manually in a test.

System specs run in a transaction. So unlike feature specs with
javascript, you do not need [DatabaseCleaner](https://github.com/DatabaseCleaner/database_cleaner).

@system_test
Scenario: System specs
Expand Down