From 3ce830272ee0516eb864a5765abba25d4b07cca4 Mon Sep 17 00:00:00 2001 From: kennyj Date: Tue, 13 Sep 2011 01:06:31 +0900 Subject: fix https://github.com/rails/rails/issues/2582 (with testcase) --- railties/test/application/rake_test.rb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'railties/test') diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 0e03c3dc2d..9b1b24fca1 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -1,3 +1,4 @@ +# coding:utf-8 require "isolation/abstract_unit" module ApplicationTests @@ -244,5 +245,20 @@ module ApplicationTests assert_match(/7 tests, 10 assertions, 0 failures, 0 errors/, content) end + + def test_assets_precompile_with_utf8_filename + add_to_config <<-RUBY + config.assets.precompile = [ /\.png$$/, /application.(css|js)$/ ] + RUBY + + Dir.chdir(app_path) do + `cp app/assets/images/rails.png app/assets/images/レイルズ.png` + `rake assets:precompile` + open("public/assets/manifest.yml") do |f| + assert_match(/レイルズ.png/, f.read) + end + end + end + end -end \ No newline at end of file +end -- cgit v1.2.3