diff options
author | Marcos Tapajos <tapajos@gmail.com> | 2012-01-13 00:14:11 -0200 |
---|---|---|
committer | Marcos Tapajos <tapajos@gmail.com> | 2012-01-13 13:28:16 -0200 |
commit | e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed (patch) | |
tree | 8df2ae95ae099b6a3daefaa758222517bc489ea8 /activesupport/test | |
parent | 1e69181c5f4120d604fe86a9c2620694760d6c8e (diff) | |
download | rails-e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed.tar.gz rails-e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed.tar.bz2 rails-e5425c8f68fbb720fcbf4b14e1f154ac27dbbbed.zip |
Cache (FileStore) clear should keep .gitkeep
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/caching_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 3454c378d3..030e31d158 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -572,6 +572,13 @@ class FileStoreTest < ActiveSupport::TestCase include CacheDeleteMatchedBehavior include CacheIncrementDecrementBehavior + def test_clear + filepath = File.join(cache_dir, ".gitkeep") + FileUtils.touch(filepath) + @cache.clear + assert File.exist?(filepath) + end + def test_key_transformation key = @cache.send(:key_file_path, "views/index?id=1") assert_equal "views/index?id=1", @cache.send(:file_path_key, key) |