Sha256: 82992e728ebdf9bed5c25eb2eafa7f20eab8f5697bfc4a00d7c639a44816e95a
Contents?: true
Size: 597 Bytes
Versions: 9
Compression:
Stored size: 597 Bytes
Contents
if Rails.env.test? || Rails.env.cucumber? CarrierWave.configure do |config| config.storage = :file config.enable_processing = false end # make sure our uploader is auto-loaded Newsletter::AssetUploader # use different dirs when testing CarrierWave::Uploader::Base.descendants.each do |klass| next if klass.anonymous? klass.class_eval do def cache_dir "#{Rails.root}/spec/support/uploads/tmp" end def store_dir "#{Rails.root}/spec/support/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems