Sha256: 757f88e11799a9ea97dfc0bde5791f233ce39772dc1c2745c7c7e10b4f1bce32

Contents?: true

Size: 1.43 KB

Versions: 10

Compression:

Stored size: 1.43 KB

Contents

# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper.rb"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

require 'rubygems'
require 'bundler/setup'

require 'rspec/its'
require 'date' # Needed for stamp
require 'stamp' # Some reasons stamp doesn't load automatically?

ENV['QT_KEYS'] ||= 'test_key_1,test_key_2'
require 'support/vcr_loader'
require 'support/coverage_loader'
require 'quick_travel' # eager load to ensure coverage correct

require 'quick_travel/config'
qt_keys = ENV['QT_KEYS'].split(',')
QuickTravel.configure do |c|
  c.url = 'http://test.qt.sealink.com.au:8080'
  c.access_key = qt_keys[0]
end

require 'quick_travel/connection_error'
require 'quick_travel/cache'

class HashCache
  def initialize
    @cache = {}
  end

  def read(name)
    @cache[name]
  end

  def write(name, value, _ = nil)
    @cache[name] = value
  end

  def clear
    @cache = {}
  end

  def delete(name)
    @cache.delete(name)
  end
end

QuickTravel::Cache.cache_store = HashCache.new

RSpec.configure do |config|
  config.raise_errors_for_deprecations!
  config.run_all_when_everything_filtered = true
  config.filter_run :focus
  config.before :each do
    allow(QuickTravel::Adapter).to receive(:cache) { ActiveSupport::Cache::MemoryStore.new }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
quicktravel_client-3.7.0 spec/spec_helper.rb
quicktravel_client-3.6.1 spec/spec_helper.rb
quicktravel_client-3.6.0 spec/spec_helper.rb
quicktravel_client-3.5.0 spec/spec_helper.rb
quicktravel_client-3.4.0 spec/spec_helper.rb
quicktravel_client-3.3.0 spec/spec_helper.rb
quicktravel_client-3.2.0 spec/spec_helper.rb
quicktravel_client-3.1.0 spec/spec_helper.rb
quicktravel_client-3.0.0 spec/spec_helper.rb
quicktravel_client-2.9.0 spec/spec_helper.rb