Skip to content

Commit 9f4122d

Browse files
authored
Infer the spec type for generator specs
Generator specs are [generated to spec/generator](https://github.com/rspec/rspec-rails/blob/6f8e3ab154a1562919ff1c08b8d19ae5ff6152e9/lib/generators/rspec/generator/generator_generator.rb#L12) Spec-type inferrence (based on file location) is not presently active for generator specs. This adds `:generator ` spec type to the mapping for inference by file location.
1 parent 6f8e3ab commit 9f4122d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/rspec/rails/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Configuration
2828
DIRECTORY_MAPPINGS = {
2929
channel: %w[spec channels],
3030
controller: %w[spec controllers],
31+
generator: %w[spec generator],
3132
helper: %w[spec helpers],
3233
job: %w[spec jobs],
3334
mailer: %w[spec mailers],

0 commit comments

Comments
 (0)