Sha256: b02422e10e3e870d74fd12bde141568b9e325df239c325b01308d698fc655bb1
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
begin # Try to require the preresolved locked set of gems. require File.expand_path('../.bundle/environment', __FILE__) rescue LoadError # Fall back on doing an unlocked resolve at runtime. require "rubygems" require "bundler" Bundler.setup end require 'pp' require 'test/unit' require 'contest' require 'redgreen' require 'vcr' begin require 'tumblr' rescue LoadError lib_path = File.join(File.dirname(__FILE__), '..', 'lib') $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path) require 'tumblr' end FakeWeb.allow_net_connect = false VCR.config do |c| # the cache_dir is where the cassette yml files will be saved. c.cache_dir = File.join(File.dirname(__FILE__),'fixtures', 'vcr_cassettes') # this record mode will be used for any cassette you create without specifying a record mode. c.default_cassette_record_mode = :none end def hijack!(request, fixture) record_mode = File.exist?(VCR::Cassette.new(fixture).cache_file) ? :none : :unregistered VCR.with_cassette(fixture, :record => record_mode) do request.perform end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
tumblr-rb-1.2.0 | test/helper.rb |
tumblr-rb-1.1.1 | test/helper.rb |
tumblr-rb-1.1.0 | test/helper.rb |
tumblr-rb-1.0.0 | test/helper.rb |
tumblr-rb-0.1.1 | test/helper.rb |
tumblr-rb-0.1.0 | test/helper.rb |