Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent unrelated exceptions by requiring
rails_helper
at .rspec
When there is a bug in the code on the load, RSpec catches the exception, aborts the spec file, proceeds to the following spec file, and retries `require` with partially loaded Rails application. In some cases, we see many identical errors, such as `NameError`, which are noisy but help developers find the bug. In other cases, we see many unrelated errors, typically `FrozenError` on finalized objects, which push out the original exception raised only from the first spec. The following comment describes this issue in detail. thoughtbot/factory_bot_rails#303 (comment) This patch prevents unrelated exceptions by the fail-fast feature. rspec/rspec-core#2568
- Loading branch information