aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2011-10-08 12:56:06 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2011-10-08 12:56:06 -0700
commit9ce03d15428fee6f63e72a3de7b60f5e1ab8a97a (patch)
tree90a545b2fc8d1ddeab508140d1ddc55442d54223 /railties/test/application
parent0d0ded39ef125a600c90bcf4c9dfea4db2de8191 (diff)
downloadrails-9ce03d15428fee6f63e72a3de7b60f5e1ab8a97a.tar.gz
rails-9ce03d15428fee6f63e72a3de7b60f5e1ab8a97a.tar.bz2
rails-9ce03d15428fee6f63e72a3de7b60f5e1ab8a97a.zip
Skip broken asset precompilation test on Macs. Issues with NFD vs NFC normalization on the asset filename. Major red flag with asset lookups!
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/assets_test.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb
index 63427c7792..3a8add3d3e 100644
--- a/railties/test/application/assets_test.rb
+++ b/railties/test/application/assets_test.rb
@@ -289,16 +289,20 @@ module ApplicationTests
end
test "precompile should handle utf8 filenames" do
- app_file "app/assets/images/レイルズ.png", "not a image really"
+ if `uname` =~ /Darwin/
+ skip 'Asset lookup with Unicode filenames is a problematic due to different normalization forms. Mac uses NKD for filenames; Windows and Linux use NFC. So your asset lookups may mysteriously fail. Sprockets should handle these platform issues transparently.'
+ end
+
+ filename = "レイルズ.png"
+ app_file "app/assets/images/#{filename}", "not a image really"
add_to_config "config.assets.precompile = [ /\.png$$/, /application.(css|js)$/ ]"
precompile!
- assert File.exists?("#{app_path}/public/assets/レイルズ.png")
+ assert File.exists?("#{app_path}/public/assets/#{filename}")
manifest = "#{app_path}/public/assets/manifest.yml"
-
assets = YAML.load_file(manifest)
- assert_equal "レイルズ.png", assets["レイルズ.png"]
+ assert_equal filename, assets[filename], assets.inspect
end
test "assets are cleaned up properly" do