Skip to content
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

Improve doc about Job specs & Rails versions matrix #1886

Merged
merged 4 commits into from Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions features/RailsVersions.md
Expand Up @@ -6,3 +6,5 @@
4.0 | >= 2.14
4.1 | >= 3.0
4.2 | >= 3.1
5.0 | >= 3.5
5.1 | >= 3.6
23 changes: 14 additions & 9 deletions features/directory_structure.feature
Expand Up @@ -3,15 +3,18 @@ Feature: Directory Structure
Specs are usually placed in a canonical directory structure that describes
their purpose:

- Model specs reside in the `spec/models` directory
- Controller specs reside in the `spec/controllers` directory
- Request specs reside in the `spec/requests` directory. The directory
can also be named `integration` or `api`.
- Feature specs reside in the `spec/features` directory
- View specs reside in the `spec/views` directory
- Helper specs reside in the `spec/helpers` directory
- Mailer specs reside in the `spec/mailers` directory
- Routing specs reside in the `spec/routing` directory
- [Model specs](model-specs) reside in the `spec/models` directory
- [Controller specs](controller-specs) reside in the `spec/controllers`
directory
- [Request specs](request-specs) reside in the `spec/requests` directory. The
directory can also be named `integration` or `api`.
- [Feature specs](feature-specs) reside in the `spec/features` directory
- [View specs](view-specs) reside in the `spec/views` directory
- [Helper specs](helper-specs) reside in the `spec/helpers` directory
- [Mailer specs](mailer-specs) reside in the `spec/mailers` directory
- [Routing specs](routing-specs) reside in the `spec/routing` directory
- [Job specs](job-specs) reside in the `spec/jobs` directory
- [System specs](system-specs) reside in the `spec/system` directory

Application developers are free to use a different directory structure. In
order to include the correct `rspec-rails` support functions, the specs need
Expand All @@ -25,6 +28,8 @@ Feature: Directory Structure
- Helper specs: `type: :helper`
- Mailer specs: `type: :mailer`
- Routing specs: `type: :routing`
- Job specs: `type: :job`
- System specs: `type: :system`

For example, say the spec for the `ThingsController` is located in
`spec/legacy/things_controller_spec.rb`. Simply tag the spec's
Expand Down