Sha256: 7ad2959b8258a22f5610f28cfb3b5a112f4bb0f2f9337a5cc569f64c22b8ceb9
Contents?: true
Size: 1.69 KB
Versions: 3
Compression:
Stored size: 1.69 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/no_core_ext' end begin require File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), 'spec_config.rb') rescue LoadError end if ENV['SEQUEL_COLUMNS_INTROSPECTION'] Sequel.extension :columns_introspection Sequel::Dataset.introspect_all_columns end Sequel::Model.cache_anonymous_models = false class Sequel::Database def log_duration(duration, message) log_info(message) end end (defined?(RSpec) ? RSpec::Core::ExampleGroup : Spec::Example::ExampleGroup).class_eval do def log begin INTEGRATION_DB.loggers << Logger.new(STDOUT) yield ensure INTEGRATION_DB.loggers.pop end end def self.cspecify(message, *checked, &block) return specify(message, &block) if ENV['SEQUEL_NO_PENDING'] pending = false checked.each do |c| case c when INTEGRATION_DB.adapter_scheme pending = c when Proc pending = c if c.first.call(INTEGRATION_DB) when Array pending = c if c.first == INTEGRATION_DB.adapter_scheme && c.last == INTEGRATION_DB.call(INTEGRATION_DB) end end if pending specify(message){pending("Not yet working on #{Array(pending).join(', ')}", &block)} else specify(message, &block) end end def check_sqls yield unless ENV['SEQUEL_NO_CHECK_SQLS'] end def self.check_sqls yield unless ENV['SEQUEL_NO_CHECK_SQLS'] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sequel-3.47.0 | spec/adapters/spec_helper.rb |
sequel-3.46.0 | spec/adapters/spec_helper.rb |
sequel-3.45.0 | spec/adapters/spec_helper.rb |