Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Tddium CarrierWave configuration
# config/initializers/carrierwave.rb
CarrierWave.configure do |config|
if Rails.env.production?
# production setup stuff
elsif Rails.env.test?
if ENV['TDDIUM'] = :file
config.root = Dir.tmpdir
config.cache_dir = "carrierwave"
else = :file
# other config

@semipermeable any suggestions for using this with Capybara specs? When I try to set storage to :file for feature specs, I get No route matches errors for images that are uploaded. We set it to store in public/tmp to get around this, but then it doesn't work consistently on Tddium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment