aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2011-10-08 13:29:16 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2011-10-08 13:29:19 -0700
commit2274c9212ebfb04920861902d32d5f0e487bd2b6 (patch)
treef399599c85f4e831821c391905072979523283a1 /railties
parent4888aba15f98b630d624645f7bba5a53bfdabb2f (diff)
parentb111b41d131fd5d90d88052bb6e95676c29a9d8d (diff)
downloadrails-2274c9212ebfb04920861902d32d5f0e487bd2b6.tar.gz
rails-2274c9212ebfb04920861902d32d5f0e487bd2b6.tar.bz2
rails-2274c9212ebfb04920861902d32d5f0e487bd2b6.zip
Merge remote-tracking branch 'guilleiguaran/test-utf8-assets-filename'
Closes #3261
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/assets_test.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb
index 3a8add3d3e..2c9ebbf327 100644
--- a/railties/test/application/assets_test.rb
+++ b/railties/test/application/assets_test.rb
@@ -289,20 +289,16 @@ module ApplicationTests
end
test "precompile should handle utf8 filenames" do
- 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/#{filename}")
+ require "#{app_path}/config/environment"
- manifest = "#{app_path}/public/assets/manifest.yml"
- assets = YAML.load_file(manifest)
- assert_equal filename, assets[filename], assets.inspect
+ get "/assets/#{URI.escape(filename)}"
+ assert_match "not a image really", last_response.body
+ assert File.exists?("#{app_path}/public/assets/#{filename}")
end
test "assets are cleaned up properly" do