Sha256: bd75cb6795fa0e6d295aa5f00a550d5563ba8f8c2c83b073297176cb0a13bdcf
Contents?: true
Size: 840 Bytes
Versions: 3
Compression:
Stored size: 840 Bytes
Contents
require 'rubygems' begin require 'simplecov' SimpleCov.start rescue LoadError end require 'rspec' require 'webmock/rspec' include WebMock::API $LOAD_PATH << File.dirname(__FILE__)+"../lib" require 'td-client' require 'msgpack' require 'json' include TreasureData shared_context 'common helper' do let :account_id do 1 end let :headers do {'Accept' => '*/*', 'Accept-Encoding' => 'deflate, gzip', 'Date' => /.*/, 'User-Agent' => 'Ruby'} end def stub_api_request(method, path, opts = nil) scheme = 'http' with_opts = {:header => headers} if opts scheme = 'https' if opts[:ssl] with_opts[:query] = opts[:query] if opts[:query] end stub_request(method, "#{scheme}://api.treasure-data.com#{path}").with(with_opts) end def e(s) require 'cgi' CGI.escape(s.to_s) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
td-client-0.8.65 | spec/spec_helper.rb |
td-client-0.8.64 | spec/spec_helper.rb |
td-client-0.8.63 | spec/spec_helper.rb |