Sha256: 7bc95fef9422d795653665b14a74871af746fe09bcc21b26bf6ad7774dc0dadf

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

require 'pingpp'
require 'test/unit'
require 'mocha/setup'
require 'stringio'
require 'shoulda/context'
require File.expand_path('../test_data', __FILE__)

module Pingpp
  @mock_rest_client = nil

  def self.mock_rest_client=(mock_client)
    @mock_rest_client = mock_client
  end
end

class Test::Unit::TestCase
  include Pingpp::TestData
  include Mocha

  setup do
    @mock = mock
    # Pingpp.mock_rest_client = @mock
    Pingpp.api_base = 'https://apidev.afon.ninja'
    Pingpp.api_key = get_api_key_live
    Pingpp.app_id = get_app_id

    Pingpp.private_key_path = File.expand_path('../rsa_private_key.pem', __FILE__)
  end

  teardown do
    Pingpp.mock_rest_client = nil
    Pingpp.api_key = nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pingpp-2.1.1 test/test_assistant.rb