Sha256: cec7daf698171ee5673a37f62bba153235a2096b7ed45ef1b35a6cfbb6175df4

Contents?: true

Size: 927 Bytes

Versions: 1

Compression:

Stored size: 927 Bytes

Contents

require "sequel"
require "timecop"

Dir[File.expand_path("../support/*.rb", __FILE__)].each{|f| require f}
ENV["TZ"]="UTC"

require "sequel_bitemporal"
Sequel::Deprecation.output = false

rspec_exclusions = {}

DB = if DbHelpers.pg?
  `createdb sequel_bitemporal_test`
  Sequel.extension :pg_range, :pg_range_ops
  if ::Sequel::Plugins::Bitemporal.jruby?
    Sequel.connect "jdbc:postgresql://localhost/sequel_bitemporal_test"
  else
    Sequel.postgres "sequel_bitemporal_test"
  end
else
  if Sequel::Plugins::Bitemporal.jruby?
    rspec_exclusions[:skip_jdbc_sqlite] = true
    Sequel::Model.plugin :typecast_on_load
    Sequel.connect "jdbc:sqlite::memory:"
  else
    Sequel.sqlite
  end
end

if ENV["DEBUG"]
  require "logger"
  DB.loggers << Logger.new($stdout)
end

RSpec.configure do |config|
  config.include DbHelpers
  config.filter_run_excluding rspec_exclusions
  config.before :each do
    db_truncate
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sequel_bitemporal-0.9.0 spec/spec_helper.rb