Sha256: 406e8846dc68cb602ace9dbf310df308f826d448b0a353e39da67357e25211c9

Contents?: true

Size: 1.32 KB

Versions: 9

Compression:

Stored size: 1.32 KB

Contents

require 'rubygems'
require 'logger'

if ENV['COVERAGE']
  require File.join(File.dirname(File.expand_path(__FILE__)), "../sequel_coverage")
  SimpleCov.sequel_coverage(:group=>%r{lib/sequel/adapters})
end

unless Object.const_defined?('Sequel')
  $:.unshift(File.join(File.dirname(File.expand_path(__FILE__)), "../../lib/"))
  require 'sequel'
end
begin
  require File.join(File.dirname(File.dirname(__FILE__)), 'spec_config.rb') unless defined?(DB)
rescue LoadError
end
Sequel::Deprecation.backtrace_filter = lambda{|line, lineno| lineno < 4 || line =~ /_(spec|test)\.rb/}

Sequel::Database.extension :columns_introspection if ENV['SEQUEL_COLUMNS_INTROSPECTION']
Sequel::Model.cache_associations = false if ENV['SEQUEL_NO_CACHE_ASSOCIATIONS']
Sequel::Model.use_transactions = false
Sequel.cache_anonymous_models = false

require './spec/guards_helper'

unless defined?(DB)
  DB = Sequel.connect(ENV['SEQUEL_INTEGRATION_URL'])
end

if DB.adapter_scheme == :ibmdb || (DB.adapter_scheme == :ado && DB.database_type == :access)
  def DB.drop_table(*tables)
    super
  rescue Sequel::DatabaseError
    disconnect
    super
  end
end

if ENV['SEQUEL_ERROR_SQL']
  DB.extension :error_sql
end

if ENV['SEQUEL_CONNECTION_VALIDATOR']
  ENV['SEQUEL_NO_CHECK_SQLS'] = '1'
  DB.extension(:connection_validator)
  DB.pool.connection_validation_timeout = -1
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sequel-4.31.0 spec/integration/spec_helper.rb
sequel-4.30.0 spec/integration/spec_helper.rb
sequel-4.29.0 spec/integration/spec_helper.rb
sequel-4.28.0 spec/integration/spec_helper.rb
sequel-4.27.0 spec/integration/spec_helper.rb
sequel-4.26.0 spec/integration/spec_helper.rb
sequel-4.25.0 spec/integration/spec_helper.rb
sequel-4.24.0 spec/integration/spec_helper.rb
sequel-4.23.0 spec/integration/spec_helper.rb