Class: RequestInterceptor::WebMockManager

Inherits:
Object
  • Object
show all
Defined in:
lib/request_interceptor/webmock_manager.rb

Defined Under Namespace

Classes: WebMockConfigurationCache

Instance Method Summary collapse

Constructor Details

#initialize(applications, callback = nil) ⇒ WebMockManager

Returns a new instance of WebMockManager.



4
5
6
7
# File 'lib/request_interceptor/webmock_manager.rb', line 4

def initialize(applications, callback = nil)
  @applications = applications
  @callback = callback
end

Instance Method Details

#run_simulationObject



9
10
11
12
13
14
15
# File 'lib/request_interceptor/webmock_manager.rb', line 9

def run_simulation
  original_webmock_configuration = setup

  yield
ensure
  teardown(original_webmock_configuration)
end