Skip to content
Extraits de code Groupes Projets
Valider b11bd23d rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

Revert "Revert "remove uploaded test images after running the specs/cucumber""...

Revert "Revert "remove uploaded test images after running the specs/cucumber"" -- using == now instead of =

This reverts commit 7969b520.
parent 0473037d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -14,7 +14,10 @@ class ProcessedImage < CarrierWave::Uploader::Base
end
def filename
model.random_string + File.extname(@filename) if @filename
fn = model.random_string
fn += "-test" if Rails.env == 'test'
fn += File.extname(@filename) if @filename
fn
end
version :thumb_small do
......
......@@ -14,7 +14,10 @@ class UnprocessedImage < CarrierWave::Uploader::Base
end
def filename
model.random_string + File.extname(@filename) if @filename
fn = model.random_string
fn += "-test" if Rails.env == 'test'
fn += File.extname(@filename) if @filename
fn
end
version :thumb_small
......
......@@ -52,6 +52,13 @@ Before do
Devise.mailer.deliveries = []
end
After do
# Rollback any images created during the features.
`rm -rf #{Rails.root}/tmp/uploads/*`
`rm -rf #{Rails.root}/public/uploads/images/*-test.png`
`rm -rf #{Rails.root}/public/uploads/tmp/`
end
silence_warnings do
SERVICES['facebook'] = {'app_id' => :fake, 'app_secret' => 'sdoigjosdfijg'}
AppConfig[:configured_services] << 'facebook'
......
......@@ -41,7 +41,10 @@ RSpec.configure do |config|
end
config.after(:all) do
# Rollback any images created during the specs
`rm -rf #{Rails.root}/tmp/uploads/*`
`rm -rf #{Rails.root}/public/uploads/images/*-test.png`
`rm -rf #{Rails.root}/public/uploads/tmp/`
end
end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter