Implement RSpec.current_scope (in 4.0, to switch `rspec-rails` to it painlessly)
Created by: pirj
This is a reproduction of #2895 on 4-0-dev branch.
The plan:
- Add the method to
rspec-core
4.0.0.pre (this PR) - Update
rspec-rails
's main branch to useRSpec.current_scope
(main depends on 4.0.0.pre ofrspec-*
), https://github.com/rspec/rspec-rails/pull/2511 - Merge #2895 (deprecates
currently_executing_a_context_hook?
and introducesRSpec.current_scope
) torspec-core
3.10-maintenance (will become part of 3.11/3.99) - Send a PR to remove
currently_executing_a_context_hook?
from 4-0-dev