Sha256: aeae121d00e3ae4ca7e9b7be092d76b0053a7d1707b806c461533394883eae1c

Contents?: true

Size: 970 Bytes

Versions: 8

Compression:

Stored size: 970 Bytes

Contents

require "sequel"
require "timecop"
require "pry"

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

require "sequel_bitemporal"

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.treat_symbols_as_metadata_keys_with_true_values = true
  config.filter_run_excluding rspec_exclusions
  config.before :each do
    db_truncate
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sequel_bitemporal-0.8.1 spec/spec_helper.rb
sequel_bitemporal-0.8.0 spec/spec_helper.rb
sequel_bitemporal-0.7.8 spec/spec_helper.rb
sequel_bitemporal-0.7.6 spec/spec_helper.rb
sequel_bitemporal-0.7.4 spec/spec_helper.rb
sequel_bitemporal-0.7.3 spec/spec_helper.rb
sequel_bitemporal-0.7.1 spec/spec_helper.rb
sequel_bitemporal-0.7.0 spec/spec_helper.rb