Method: RSpecConsole::ConfigCache#config_proxy

Defined in:
lib/rspec-console/config_cache.rb

#config_proxyObject

We have to reset the RSpec.configuration, because it contains a lot of information related to the current test (what’s running, what are the different test results, etc).

RSpec.configuration gets also loaded with a bunch of stuff from the ‘spec/spec_helper.rb’ file. Often that instance is extended with other modules (FactoryGirl, Mocha,…) and we don’t want to replace requires with load all around the place.

Instead, we proxy and record whatever is done to RSpec.configuration during the first invocation of require(‘spec_helper’). This is done by interposing the RecordingProxy class on of RSpec.configuration.



14
15
16
# File 'lib/rspec-console/config_cache.rb', line 14

def config_proxy
  @config_proxy
end