File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
lib/generators/rspec/install/templates/spec Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 67
67
# config.use_transactional_fixtures = true
68
68
69
69
<% end -%>
70
- # RSpec Rails can automatically mix in different behaviours to your tests
71
- # based on their file location, for example enabling you to call `get` and
72
- # `post` in specs under `spec/controllers`.
70
+ # RSpec Rails uses metadata to mix in different behaviours to your tests,
71
+ # for example enabling you to call `get` and `post` in request specs. e.g.:
73
72
#
74
- # You can disable this behaviour by removing the line below, and instead
75
- # explicitly tag your specs with their type, e.g.:
76
- #
77
- # RSpec.describe UsersController, type: :controller do
73
+ # RSpec.describe UsersController, type: :request do
78
74
# # ...
79
75
# end
80
76
#
81
77
# The different available types are documented in the features, such as in
82
78
# https://rspec.info/features/7-0/rspec-rails
83
- config.infer_spec_type_from_file_location!
79
+ #
80
+ # You can also this infer these behaviours automatically by location, e.g.
81
+ # /spec/models would pull in the same behaviour as `type: :model` but this
82
+ # behaviour is considered legacy and will be removed in a future version.
83
+ #
84
+ # To enable this behaviour uncomment the line below.
85
+ # config.infer_spec_type_from_file_location!
84
86
85
87
# Filter lines from Rails gems in backtraces.
86
88
config.filter_rails_from_backtrace!
You can’t perform that action at this time.
0 commit comments