Skip to content

Instantly share code, notes, and snippets.

@bleonard
Created December 24, 2016 19:22
Show Gist options
  • Save bleonard/727eac35d29e90578da4492a95d43b42 to your computer and use it in GitHub Desktop.
Save bleonard/727eac35d29e90578da4492a95d43b42 to your computer and use it in GitHub Desktop.
class VCR::Client
def current_cassette
cassetes.last
end
def configure
yield configuration
end
def configuration
@configuration ||= Configuration.new
end
private
def cassettes
@cassettes ||= []
end
end
module VCR
extend self
delegate :current_cassette, :configure, :configuration, :to => :default_client
def default_client
@default_client ||= Client.new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment