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

This reverts commit b11bd23da2.
This commit is contained in:
Raphael Sofaer 2011-08-18 12:06:04 -07:00
parent b11bd23da2
commit c7331230bc
4 changed files with 2 additions and 18 deletions

View file

@ -14,10 +14,7 @@ class ProcessedImage < CarrierWave::Uploader::Base
end
def filename
fn = model.random_string
fn += "-test" if Rails.env == 'test'
fn += File.extname(@filename) if @filename
fn
model.random_string + File.extname(@filename) if @filename
end
version :thumb_small do

View file

@ -14,10 +14,7 @@ class UnprocessedImage < CarrierWave::Uploader::Base
end
def filename
fn = model.random_string
fn += "-test" if Rails.env == 'test'
fn += File.extname(@filename) if @filename
fn
model.random_string + File.extname(@filename) if @filename
end
version :thumb_small

View file

@ -52,13 +52,6 @@ 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'

View file

@ -41,10 +41,7 @@ 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