Sha256: 7d6b3427189e85890cb694eff5cd23d9cd261622b287b28e3a9245cf859801b3

Contents?: true

Size: 825 Bytes

Versions: 10

Compression:

Stored size: 825 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'

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

10 entries across 10 versions & 1 rubygems

Version Path
td-client-0.8.62 spec/spec_helper.rb
td-client-0.8.61 spec/spec_helper.rb
td-client-0.8.60 spec/spec_helper.rb
td-client-0.8.59 spec/spec_helper.rb
td-client-0.8.58 spec/spec_helper.rb
td-client-0.8.57 spec/spec_helper.rb
td-client-0.8.56 spec/spec_helper.rb
td-client-0.8.55 spec/spec_helper.rb
td-client-0.8.54 spec/spec_helper.rb
td-client-0.8.53 spec/spec_helper.rb