Skip to content

Instantly share code, notes, and snippets.

@terut
terut / spec_helper.rb
Created November 21, 2011 13:33
Clean up carrierwave's files for rspec.
RSpec.configure do |config|
# ...
config.after(:all) do
if Rails.env.test?
FileUtils.rm_rf(Dir["#{Rails.root}/spec/support/uploads"])
end
end
end
# put logic in this file or initalizer/carrierwave.rb