From 6e747d720de3d91d75b3ce189ac7d95cf5bbc74c Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 30 Mar 2016 13:57:01 +0200 Subject: [PATCH] Move CarrierWave test env config to separate file --- spec/spec_helper.rb | 5 ----- spec/support/carrierwave.rb | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 spec/support/carrierwave.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a769bcb2a5a..596d607f2a1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -45,10 +45,6 @@ RSpec.configure do |config| config.before(:suite) do TestEnv.init end - - config.after(:suite) do - FileUtils.rm_rf('tmp/tests/files') - end end FactoryGirl::SyntaxRunner.class_eval do @@ -62,4 +58,3 @@ RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator.class_eval do end ActiveRecord::Migration.maintain_test_schema! -CarrierWave.root = 'tmp/tests/files' diff --git a/spec/support/carrierwave.rb b/spec/support/carrierwave.rb new file mode 100644 index 00000000000..aa89afd8fb3 --- /dev/null +++ b/spec/support/carrierwave.rb @@ -0,0 +1,7 @@ +CarrierWave.root = 'tmp/tests/uploads' + +RSpec.configure do |config| + config.after(:suite) do + FileUtils.rm_rf('tmp/tests/uploads') + end +end