Sha256: 7acef49dcf20f3112ea8c06cf9cec36ebdc74efe3f5cffa75cae23ab40d64e38
Contents?: true
Size: 815 Bytes
Versions: 4
Compression:
Stored size: 815 Bytes
Contents
require 'helper' module Coupler class TestDataUploader < Coupler::Test::UnitTest def test_carrierwave_subclass assert_equal CarrierWave::Uploader::Base, DataUploader.superclass end def test_store_dir_same_as_upload_path Base.expects(:upload_path).returns("/path/to/uploads") uploader = DataUploader.new assert_equal "/path/to/uploads", uploader.store_dir end def test_cache_dir_uses_upload_path Base.expects(:upload_path).returns("/path/to/uploads") uploader = DataUploader.new assert_equal "/path/to/uploads/tmp", uploader.cache_dir end def test_filename_uniqueness uploader = DataUploader.new uploader.store!(fixture_file_upload('people.csv')) assert_match /^people-[a-f0-9]+.csv$/, uploader.filename end end end
Version data entries
4 entries across 4 versions & 1 rubygems