Class: Thor::Task

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

Instance Method Summary collapse

Instance Method Details

#run_with_vcr(instance, args = []) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/vcr.rb', line 12

def run_with_vcr(instance, args=[])
  cassette = ENV.delete('VCR_CASSETTE')
  VCR.configure do |c|
    c.cassette_library_dir = Holistics.root.join 'features/vcr_cassettes'
    c.default_cassette_options = {:record => :new_episodes}
    c.hook_into :webmock
  end
  VCR.use_cassette(cassette) do
    run_without_vcr(instance, args)
  end
end