Sha256: a131866f0dab0d2789d8c81be8aa41ef078c1f6751a150b3a47e36876f44849c

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

NetRecorder.config do |config|
  config.cache_file = "fakeweb_cache"   
  if ENV['RECORD_WEB']
    config.record_net_calls = true
  else
    config.fakeweb = true
    FakeWeb.allow_net_connect = false
  end
end 

at_exit {NetRecorder.cache! if NetRecorder.recording?}

Before do |scenario|
  if NetRecorder.recording?
    NetRecorder.scope = scenario.name
  else
    FakeWeb.clean_registry
    NetRecorder.register_scope(scenario.name)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
360_services-0.0.2 features/support/netrecorder.rb
360_services-0.0.1 features/support/netrecorder.rb