Sha256: 6e8014b152fa553528c477483eab739e1892f720d985bd566060ffb41f14bcce

Contents?: true

Size: 468 Bytes

Versions: 15

Compression:

Stored size: 468 Bytes

Contents

def set_expected_response(code, body, content_type = 'application/json')
  Typhoeus.stub(/hellosign.com/) do
    Typhoeus::Response.new(
      :code    => code,
      :headers => ['Content-Type' => content_type],
      :body    => body,
    )
  end
end

def get_fixture_data(file)
  path = __dir__ + "/../test_fixtures/#{file}.json"

  if ! File.exist? path
    raise "Fixture file #{path} not found"
  end

  JSON.parse(File.read(path), :symbolize_names => true)
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dropbox-sign-1.8.0 spec/test_utils.rb
dropbox-sign-1.7.0 spec/test_utils.rb
dropbox-sign-1.6.1 spec/test_utils.rb
dropbox-sign-1.6.0 spec/test_utils.rb
dropbox-sign-1.5.0 spec/test_utils.rb
dropbox-sign-1.4.1 spec/test_utils.rb
dropbox-sign-1.4.0 spec/test_utils.rb
dropbox-sign-1.3.0 spec/test_utils.rb
dropbox-sign-1.2.0 spec/test_utils.rb
dropbox-sign-1.1.2 spec/test_utils.rb
dropbox-sign-1.1.1 spec/test_utils.rb
dropbox-sign-1.1.0 spec/test_utils.rb
dropbox-sign-1.0.1 spec/test_utils.rb
dropbox-sign-1.0.0 spec/test_utils.rb
dropbox-sign-1.0.0.pre.beta2301 spec/test_utils.rb