diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-12 20:18:03 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-12 20:18:03 -0700 |
commit | 1b127fcdea28d6c6ab2f2c6370125c8817ba99d6 (patch) | |
tree | bf175900629b88ceb709a1f4df8aca9ec533cacc /actionpack/test | |
parent | 45b79d933cd2433b30ae98e7dadc4ae060e170c9 (diff) | |
download | rails-1b127fcdea28d6c6ab2f2c6370125c8817ba99d6.tar.gz rails-1b127fcdea28d6c6ab2f2c6370125c8817ba99d6.tar.bz2 rails-1b127fcdea28d6c6ab2f2c6370125c8817ba99d6.zip |
Set asset-cached file ctime and mtime to the max mtime of the combined files. Allows for consistent ETag generation without having a shared filesystem.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 8410e82c3c..7e40a55dc5 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -425,7 +425,8 @@ class AssetTagHelperTest < ActionView::TestCase stylesheet_link_tag(:all, :cache => true) ) - assert File.exist?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'all.css')) + expected = Dir["#{ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR}/*.css"].map { |p| File.mtime(p) }.max + assert_equal expected, File.mtime(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'all.css')) assert_dom_equal( %(<link href="http://a0.example.com/stylesheets/money.css" media="screen" rel="stylesheet" type="text/css" />), |