File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -246,10 +246,7 @@ or for official Rails API documentation on the given `TestCase` class.
246
246
> Ultimately, it’s up to you to decide how your test suite will be composed.
247
247
248
248
When creating a spec file,
249
- assign it a type by placing it [ in the appropriate folder] [ ]
250
- (_ e.g.,_ ` spec/models/ ` for model specs).
251
- If you want to be extra explicit,
252
- you can set the ` :type ` option at the top of the file, like so:
249
+ assign it a type in the top-level ` describe ` block, like so:
253
250
254
251
``` ruby
255
252
# spec/models/user_spec.rb
@@ -258,12 +255,6 @@ RSpec.describe User, type: :model do
258
255
...
259
256
```
260
257
261
- If you use the built-in generators, these details will be handled automatically:
262
-
263
- ``` sh
264
- $ rails generate rspec:< type> < name>
265
- ```
266
-
267
258
[ request ] : https://relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec
268
259
[ feature ] : https://www.relishapp.com/rspec/rspec-rails/docs/feature-specs/feature-spec
269
260
[ system ] : https://relishapp.com/rspec/rspec-rails/docs/system-specs/system-spec
You can’t perform that action at this time.
0 commit comments