Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Engine's
RSpec
auto-integration
Nest test framework integration code within [initializer][] blocks. From within those blocks, access the configuration through the [Rails::Application#config][] attribute. For `RSpec`, it's possible for the `RSpec` constant to exist prior to the `RSpec.configure` module method. Drawing from prior art (like [capybara's integration with RSpec][capybara/rspec], requiring `rspec/core` appears to be a predictable way to guarantee the definition of `RSpec.configure`. When `rspec/core` is already loaded, the `require` statement will be a no-op. [initializer]: https://api.rubyonrails.org/classes/Rails/Application.html#method-i-initializer [Rails::Application#config]: https://edgeapi.rubyonrails.org/classes/Rails/Application.html [capybara/rspec]: https://github.com/teamcapybara/capybara/blob/6267ff65a294a7dcbe9d7281c30cc2d91b08b093/lib/capybara/rspec.rb#L3
- Loading branch information