Chooses what mock framework to use. Example:
To use any other mock framework, you’ll have to provide your own adapter. This is simply a module that responds to the following methods:
setup_mocks_for_rspec verify_mocks_for_rspec teardown_mocks_for_rspec.
These are your hooks into the lifecycle of a given example. RSpec will call setup_mocks_for_rspec before running anything else in each Example. After executing the #after methods, RSpec will then call verify_mocks_for_rspec and teardown_mocks_for_rspec (this is guaranteed to run even if there are failures in verify_mocks_for_rspec).
Once you’ve defined this module, you can pass that to mock_with:
# File lib/spec/runner/configuration.rb, line 31 def mock_with(mock_framework) @mock_framework = case mock_framework when Symbol mock_framework_path(mock_framework.to_s) else mock_framework end end