Sha256: a9cc5d1b8471d35e39ac244059d4c92b7d7463dccad28e5166f89f2a40492743
Contents?: true
Size: 1.07 KB
Versions: 6
Compression:
Stored size: 1.07 KB
Contents
require 'testr/config' require 'active_support/inflector' TestR::Config.reabsorb_file_greps.push( %r<^config/.+\.(rb|yml)$>, %r<^db/schema\.rb$>, %r<^Gemfile\.lock$> ) TestR::Config.test_file_globbers[%r<^(app|lib|test|spec)/.+\.rb$>] = lambda do |path| base = File.basename(path, '.rb') poly = ActiveSupport::Inflector.pluralize(base) "{test,spec}/**/{#{base},#{poly}_*}_{test,spec}.rb" end TestR::Config.test_file_globbers[%r<^(test|spec)/factories/.+_factory\.rb$>] = lambda do |path| base = File.basename(path, '_factory.rb') poly = ActiveSupport::Inflector.pluralize(base) "{test,spec}/**/{#{base},#{poly}_*}_{test,spec}.rb" end begin require 'rails/railtie' Class.new Rails::Railtie do config.before_initialize do |app| if app.config.cache_classes warn "testr/config/rails: Setting #{app.class}.config.cache_classes = false" app.config.cache_classes = false end end end rescue LoadError warn "testr/config/rails: Railtie not available; please manually set:\n\t"\ "config.cache_classes = false" end
Version data entries
6 entries across 6 versions & 1 rubygems