Sha256: 61cbe71b7987a77c28e0de3367608b1b4e03b59b277ad56ff15d34f8dac78846

Contents?: true

Size: 1.24 KB

Versions: 10

Compression:

Stored size: 1.24 KB

Contents

require 'coveralls'
Coveralls.wear!
require 'test/unit'
require File.expand_path("../../lib/exlibris-aleph.rb",  __FILE__)

# VCR is used to 'record' HTTP interactions with
# third party services used in tests, and play em
# back. Useful for efficiency, also useful for
# testing code against API's that not everyone
# has access to -- the responses can be cached
# and re-used. 
require 'vcr'
require 'webmock'

VCR.configure do |c|
  c.cassette_library_dir = 'test/vcr_cassettes'
  # webmock needed for HTTPClient testing
  c.hook_into :webmock 
  # c.debug_logger = $stderr
  c.filter_sensitive_data("library.edu") { "library.nyu.edu" }
end

class Test::Unit::TestCase

  def yaml_aleph_configuration
    Exlibris::Aleph.configure do |config|
      config.load_yaml File.expand_path("../support/config.yml",  __FILE__)
    end
  end
  protected :yaml_aleph_configuration

  def reset_aleph_configuration
    Exlibris::Aleph.configure do |config|
      config.base_url = nil
      config.rest_url = nil
      config.adms = nil
      config.refresh_time = nil
      config.tab_path = nil
      config.yml_path = nil
      config.logger = nil
      config.irrelevant_sub_libraries = nil
      config.load_time = nil
    end
  end
  protected :reset_aleph_configuration
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
exlibris-aleph-1.1.0 test/test_helper.rb
exlibris-aleph-1.0.8 test/test_helper.rb
exlibris-aleph-1.0.7 test/test_helper.rb
exlibris-aleph-1.0.6 test/test_helper.rb
exlibris-aleph-1.0.5 test/test_helper.rb
exlibris-aleph-1.0.4 test/test_helper.rb
exlibris-aleph-1.0.3 test/test_helper.rb
exlibris-aleph-1.0.2 test/test_helper.rb
exlibris-aleph-1.0.1 test/test_helper.rb
exlibris-aleph-1.0.0 test/test_helper.rb