It became something like that:

```ruby
      context 'when user did not configure mock framework' do
        def emulate_not_configured_mock_framework
          original_mocks = RSpec::Mocks
          allow(RSpec.configuration).to receive(:mock_with).with(:rspec) do |arg|
            @mocks.send(:define_singleton_method, :configuration) { original_mocks.configuration }
            RSpec.configuration.instance_variable_set :@mock_framework, RSpec::Core::MockingAdapters::RSpec
          end
          @mocks = stub_const('RSpec::Mocks', original_mocks.dup)
          @mocks.instance_eval { undef :configuration }
          RSpec.configuration.instance_variable_set :@mock_framework, nil
          ExampleGroup.remove_class_variable :@@example_groups_configured
        end

        it 'disables monkey patching after example groups being configured' do
          emulate_not_configured_mock_framework

          RSpec.configuration.disable_monkey_patching!
          expect(defined? @mocks.configuration).to eq(nil)

          expect {
            ExampleGroup.ensure_example_groups_are_configured
          }.to change { @mocks.configuration.syntax rescue [:expect, :should] }.
            from([:expect, :should]).to([:expect])
        end
      end
```