Sha256: 3f4ba45a26e2c3838e39b3632b6bbf51eab78b86407bf6d5cb3b0377ae4d6a86
Contents?: true
Size: 695 Bytes
Versions: 18
Compression:
Stored size: 695 Bytes
Contents
require 'active_record' module SpecCondition class << self def postgresql? ENV['POSTGRESQL'] == '1' end def mysql_awesome_enabled? ENV['ENABLE_MYSQL_AWESOME'] == '1' end def activerecord_4? ActiveRecord::VERSION::MAJOR >= 4 and ActiveRecord::VERSION::MAJOR < 5 end def activerecord_5? ActiveRecord::VERSION::MAJOR >= 5 and ActiveRecord::VERSION::MAJOR < 6 end def debug? ENV['DEBUG'] == '1' end end def condition(*conds) conds.any? do |c| if c.is_a? Array c.all? {|i| SpecCondition.send("#{i}?") } else SpecCondition.send("#{c}?") end end end end include SpecCondition
Version data entries
18 entries across 18 versions & 1 rubygems