File tree Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 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 ` .
3
3
4
4
A controller spec is an RSpec wrapper for a Rails functional test
5
5
([ ActionController::TestCase::Behavior] ( https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/test_case.rb ) ).
Original file line number Diff line number Diff line change 1
1
Feature : helper spec
2
2
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 `.
5
5
6
6
Helper specs expose a `helper` object, which includes the helper module being
7
7
specified, the `ApplicationHelper` module (if there is one) and all of the
Original file line number Diff line number Diff line change 1
1
Feature : URL helpers in mailer examples
2
2
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
+
3
6
Scenario : using URL helpers with default options
4
7
Given a file named "config/initializers/mailer_defaults.rb" with:
5
8
"""ruby
Original file line number Diff line number Diff line change 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 ` .
3
3
4
4
A model spec is a thin wrapper for an ActiveSupport::TestCase, and includes all
5
5
of the behavior and assertions that it provides, in addition to RSpec's own
Original file line number Diff line number Diff line change 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` .
3
3
4
4
Simple apps with nothing but standard RESTful routes won't get much value from
5
5
routing specs, but they can provide significant value when used to specify
You can’t perform that action at this time.
0 commit comments