VCR::RSpec::Macros

Public Instance Methods

use_vcr_cassette(*args) click to toggle source
# File lib/vcr/test_frameworks/rspec.rb, line 4
def use_vcr_cassette(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  name    = args.first || infer_cassette_name

  before(:each) do
    VCR.insert_cassette(name, options)
  end

  after(:each) do
    VCR.eject_cassette
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.