Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add the cache_only configuration option #1456
I’ve been trying to get test fixtures working on CarrierWave, and came up with a solution that works by monkey-patching
It’d be great to be able to set a configuration option in your tests instead of breaking a method in the mounter, so I added a configuration option called “cache_only”, which does the same thing. What do you think?
added a commit
this pull request
Sep 30, 2014
@jeffkreeftmeijer How do we use this? Your blog post doesn't show how still and I'm not sure how to set the configuration option in Carrierwave in my test_helper. Thanks for any help and for your contribution!
class ActiveSupport::TestCase # ... CarrierWave.configure do |config| config.root = Rails.root.join("test/fixtures/files") config.cache_only = true config.enable_processing = false config.storage = :file end def after_teardown super CarrierWave.clean_cached_files!(0) end end