test/test_helper.rb in attachs-0.4.4 vs test/test_helper.rb in attachs-0.4.5
- old
+ new
@@ -24,19 +24,23 @@
class ActiveSupport::TestCase
include ActionView::Helpers::NumberHelper
private
+ def clean_storage
+ FileUtils.rm_rf Rails.root.join('public/storage')
+ end
+
def fixture_file_upload(path, content_type)
Rack::Test::UploadedFile.new(Rails.root.join("test/fixtures/#{path}"), content_type)
end
def file_upload
fixture_file_upload('file.txt', 'text/plain')
end
def image_upload
- fixture_file_upload('180x150.gif', 'image/gif')
+ fixture_file_upload('image.gif', 'image/gif')
end
def assert_url(url)
assert_equal '200', Net::HTTP.get_response(URI(url)).code
end