Skip to content

Commit 01c22b9

Browse files
JonRowesebjacobs
authored andcommitted
Add note about different between helpers (rspec#1731)
[skip ci]
1 parent fe18824 commit 01c22b9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ There are three particular `rspec-rails` specific changes to be aware of:
9090
4. Extraction of `stub_model` and `mock_model` to
9191
[`rspec-activemodel-mocks`](https://github.com/rspec/rspec-activemodel-mocks)
9292
5. In Rails 5.x, controller testing has been moved to its own gem which is [rails-controller-testing](https://github.com/rails/rails-controller-testing). Using `assigns` in your controller specs without adding this gem will no longer work.
93+
6. `rspec-rails` now includes two helpers, `spec_helper.rb` and `rails_helper.rb`.
94+
`spec_helper.rb` is the conventional RSpec configuration helper, whilst the
95+
Rails specific loading and bootstrapping has moved to the `rails_helper.rb`
96+
file. Rails specs now need this file required beforehand either at the top
97+
of the specific file (recommended) or a common configuration location such
98+
as your `.rspec` file.
9399

94100
Please see the [RSpec Rails Upgrade
95101
docs](https://www.relishapp.com/rspec/rspec-rails/docs/upgrade) for full

0 commit comments

Comments
 (0)