Skip to content

Commit eabf9bc

Browse files
committed
update or add wording indicating the use of :type tagging and our preference for it over inferring location
1 parent 996bef8 commit eabf9bc

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

features/controller_specs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Controller specs live in `spec/controllers` or any example group with
2-
`:type => :controller`.
1+
Controller specs are marked by `:type => :controller` or if you have set
2+
`config.infer_spec_type_from_file_location!` by placing them in `spec/controllers`.
33

44
A controller spec is an RSpec wrapper for a Rails functional test
55
([ActionController::TestCase::Behavior](https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/test_case.rb)).

features/helper_specs/helper_spec.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Feature: helper spec
22

3-
Helper specs live in `spec/helpers`, or any example group with `:type =>
4-
:helper`.
3+
Helper specs are marked by `:type => :helper` or if you have set
4+
`config.infer_spec_type_from_file_location!` by placing them in `spec/helpers`.
55

66
Helper specs expose a `helper` object, which includes the helper module being
77
specified, the `ApplicationHelper` module (if there is one) and all of the

features/mailer_specs/url_helpers.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Feature: URL helpers in mailer examples
22

3+
Mailer specs are marked by `:type => :mailer` or if you have set
4+
`config.infer_spec_type_from_file_location!` by placing them in `spec/mailer`.
5+
36
Scenario: using URL helpers with default options
47
Given a file named "config/initializers/mailer_defaults.rb" with:
58
"""ruby

features/model_specs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Model specs live in `spec/models` or any example group with
2-
`:type => :model`.
1+
Model specs are marked by `:type => :model` or if you have set
2+
`config.infer_spec_type_from_file_location!` by placing them in `spec/models`.
33

44
A model spec is a thin wrapper for an ActiveSupport::TestCase, and includes all
55
of the behavior and assertions that it provides, in addition to RSpec's own

features/routing_specs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Routing specs live in the `spec/routing` directory, or any example group with
2-
`:type => :routing`.
1+
Routing specs are marked by `:type => :routing` or if you have set
2+
`config.infer_spec_type_from_file_location!` by placing them in `spec/routing`.
33

44
Simple apps with nothing but standard RESTful routes won't get much value from
55
routing specs, but they can provide significant value when used to specify

0 commit comments

Comments
 (0)