Skip to content

Commit 3c571a8

Browse files
committed
Fix directory structure feature
1 parent d4858f4 commit 3c571a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

features/directory_structure.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ Feature: The directory structure
4343
`RSpec.describe` block with the `type: :controller` metadata:
4444

4545
```ruby
46-
# spec/legacy/things_controller_spec.rb
46+
# spec/legacy/things_controller_spec.rb
4747
RSpec.describe ThingsController, type: :controller do
4848
describe "GET index" do
49-
# Examples
49+
# Examples
5050
end
5151
end
5252
```
@@ -56,7 +56,7 @@ Feature: The directory structure
5656

5757
Check out the [`rspec-core`](../../latest/rspec-core) documentation on [using metadata](../../latest/rspec-core/metadata) for more details.
5858

59-
## Automatically Adding Metadata
59+
**Automatically Adding Metadata**
6060

6161
RSpec versions before 3.0.0 automatically added metadata to specs based on
6262
their location on the filesystem. This was both confusing to new users and not
@@ -65,7 +65,7 @@ Feature: The directory structure
6565
This behaviour must be explicitly enabled:
6666

6767
```ruby
68-
# spec/rails_helper.rb
68+
# spec/rails_helper.rb
6969
RSpec.configure do |config|
7070
config.infer_spec_type_from_file_location!
7171
end
@@ -81,15 +81,15 @@ Feature: The directory structure
8181
If you want to set metadata for a custom directory that doesn't follow fit the canonical structure above, you can do the following:
8282

8383
```ruby
84-
# set `:type` for serializers directory
84+
# set `:type` for serializers directory
8585
RSpec.configure do |config|
8686
config.define_derived_metadata(:file_path => Regexp.new('/spec/serializers/')) do |metadata|
8787
metadata[:type] = :serializer
8888
end
8989
end
9090
```
9191

92-
## Tips on Spec Location
92+
**Tips on Spec Location**
9393

9494
It is suggested that the `spec/` directory structure generally mirror both
9595
`app/` and `lib/`. This makes it easy to locate corresponding code and spec

0 commit comments

Comments
 (0)