Sha256: f6a2ce7142327882fdd6efb9a4abc5b7f510aefb1c92b81e230bf74dc2c71468

Contents?: true

Size: 719 Bytes

Versions: 2

Compression:

Stored size: 719 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'alf-sequel'
require "rspec"
require 'path'
require_relative 'fixtures/sap.rb'

module Helpers

  def sequel_database_path
    Path.dir/'alf.db'
  end

  def sequel_database_uri
    "#{Alf::Sequel::Adapter.sqlite_protocol}://#{sequel_database_path}"
  end

  def sequel_database_memory
    "#{Alf::Sequel::Adapter.sqlite_protocol}::memory:"
  end

  def sap
    @sap ||= Alf.connect Path.relative("fixtures/sap.db")
  end

  def sap_memory
    Alf.connect(SAP.create!(sequel_database_memory), schema_cache: false)
  end

end

RSpec.configure do |c|
  c.include Helpers
  c.extend  Helpers
  c.filter_run_excluding :ruby19 => (RUBY_VERSION < "1.9")
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-sequel-0.14.0 spec/spec_helper.rb
alf-sequel-0.13.0 spec/spec_helper.rb