Skip to content

Commit a736988

Browse files
committed
Fix description of spec type assignment, per @JonRowe's suggestion
1 parent 758801c commit a736988

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,7 @@ or for official Rails API documentation on the given `TestCase` class.
246246
> Ultimately, it’s up to you to decide how your test suite will be composed.
247247
248248
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:
253250

254251
```ruby
255252
# spec/models/user_spec.rb
@@ -258,12 +255,6 @@ RSpec.describe User, type: :model do
258255
...
259256
```
260257

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-
267258
[request]: https://relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec
268259
[feature]: https://www.relishapp.com/rspec/rspec-rails/docs/feature-specs/feature-spec
269260
[system]: https://relishapp.com/rspec/rspec-rails/docs/system-specs/system-spec

0 commit comments

Comments
 (0)