Revert "remove uploaded test images after running the specs/cucumber"
This reverts commit a6eb275c7a.
This commit is contained in:
parent
a6eb275c7a
commit
7969b52035
4 changed files with 2 additions and 18 deletions
|
|
@ -14,10 +14,7 @@ class ProcessedImage < CarrierWave::Uploader::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def filename
|
def filename
|
||||||
fn = model.random_string
|
model.random_string + File.extname(@filename) if @filename
|
||||||
fn += "-test" if Rails.env = 'test'
|
|
||||||
fn += File.extname(@filename) if @filename
|
|
||||||
fn
|
|
||||||
end
|
end
|
||||||
|
|
||||||
version :thumb_small do
|
version :thumb_small do
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,7 @@ class UnprocessedImage < CarrierWave::Uploader::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def filename
|
def filename
|
||||||
fn = model.random_string
|
model.random_string + File.extname(@filename) if @filename
|
||||||
fn += "-test" if Rails.env = 'test'
|
|
||||||
fn += File.extname(@filename) if @filename
|
|
||||||
fn
|
|
||||||
end
|
end
|
||||||
|
|
||||||
version :thumb_small
|
version :thumb_small
|
||||||
|
|
|
||||||
|
|
@ -52,13 +52,6 @@ Before do
|
||||||
Devise.mailer.deliveries = []
|
Devise.mailer.deliveries = []
|
||||||
end
|
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
|
silence_warnings do
|
||||||
SERVICES['facebook'] = {'app_id' => :fake, 'app_secret' => 'sdoigjosdfijg'}
|
SERVICES['facebook'] = {'app_id' => :fake, 'app_secret' => 'sdoigjosdfijg'}
|
||||||
AppConfig[:configured_services] << 'facebook'
|
AppConfig[:configured_services] << 'facebook'
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,7 @@ RSpec.configure do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
config.after(:all) do
|
config.after(:all) do
|
||||||
# Rollback any images created during the specs
|
|
||||||
`rm -rf #{Rails.root}/tmp/uploads/*`
|
`rm -rf #{Rails.root}/tmp/uploads/*`
|
||||||
`rm -rf #{Rails.root}/public/uploads/images/*-test.png`
|
|
||||||
`rm -rf #{Rails.root}/public/uploads/tmp/`
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue