Sha256: 32be511459c8d8bc1c0b8b7b72654f3324b54df749d81b919440e39ba37be73f
Contents?: true
Size: 773 Bytes
Versions: 12
Compression:
Stored size: 773 Bytes
Contents
require File.dirname(__FILE__) + '/../../test/test_helper' class FleximageImageDirectoryOptionTest < Test::Unit::TestCase def test_should_store_in_default_image_directory PhotoBare.use_creation_date_based_directories = true p = PhotoBare.create(:image_file => files(:photo)) assert_match %r{public/uploads/\d+/\d+/\d+/\d+}, p.file_path assert File.exists?(p.file_path) end def test_should_set_image_directory PhotoBare.use_creation_date_based_directories = true PhotoBare.image_directory = 'public/uploads/foo' p = PhotoBare.create(:image_file => files(:photo)) assert_match %r{public/uploads/foo/\d+/\d+/\d+/\d+}, p.file_path assert File.exists?(p.file_path) ensure PhotoBare.image_directory = 'public/uploads' end end
Version data entries
12 entries across 12 versions & 4 rubygems