Skip to content

Commit 74e665c

Browse files
committed
Require rails_helper instead of spec_helper on rspec
rails_helper is an actual entry point of specs. This change allows developers to running single spec like the following: ``` $ bundle exec rspec spec/models/letter_opener_web/letter_spec.rb ``` Without this change, the following error will be occurred: ``` $ bundle exec rspec spec/models/letter_opener_web/letter_spec.rb An error occurred while loading ./spec/models/letter_opener_web/letter_spec.rb. Failure/Error: RSpec.describe LetterOpenerWeb::Letter do let(:location) { Pathname.new(__dir__).join('..', '..', 'tmp').cleanpath } ... NameError: uninitialized constant LetterOpenerWeb::Letter ```
1 parent feea82d commit 74e665c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.rspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
--order rand
22
--color
33
--format progress
4-
--require spec_helper
4+
--require rails_helper

0 commit comments

Comments
 (0)