Sha256: d1689604f033ce3a757b07a058764303e09ab1c0c7fee094208a850d4cc706c4
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require "yaml" require "zlib" require "minitest/autorun" require "webmock/minitest" require "vcr" require "mocha" require "picasa" AuthHeader = ENV["PICASA_AUTH_HEADER"] || "GoogleLogin auth=token" Password = ENV["PICASA_PASSWORD"] || "secret" MultiJson.adapter = ENV["JSON_PARSER"] || "oj" VCR.configure do |c| c.cassette_library_dir = "test/cassettes" c.hook_into :webmock c.default_cassette_options = {:serialize_with => :syck, :preserve_exact_body_bytes => true} # Avoid stroing headers as binary c.filter_sensitive_data("<FILTERED>") { AuthHeader } c.filter_sensitive_data("<FILTERED>") { Password } end class MiniTest::Unit::TestCase def setup WebMock.disable_net_connect! end def image_path(filename) File.join("test", "fixtures", filename) end # Retrieves gzipped body def decode(cassette_name) cassette = YAML.load_file(File.join("test", "cassettes", cassette_name)) gzipped_body = cassette["http_interactions"][0]["response"]["body"]["string"] body_io = StringIO.new(gzipped_body) Zlib::GzipReader.new(body_io).read end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
picasa-0.6.0 | test/helper.rb |