diff options
author | kennyj <kennyj@gmail.com> | 2011-09-13 01:06:31 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2011-09-13 01:06:31 +0900 |
commit | 3ce830272ee0516eb864a5765abba25d4b07cca4 (patch) | |
tree | 8bac4cd25a0547bebe91c97670313ee0152b3268 /railties | |
parent | ef14a0ec8647010eed3a8006409739e6d42791a9 (diff) | |
download | rails-3ce830272ee0516eb864a5765abba25d4b07cca4.tar.gz rails-3ce830272ee0516eb864a5765abba25d4b07cca4.tar.bz2 rails-3ce830272ee0516eb864a5765abba25d4b07cca4.zip |
fix https://github.com/rails/rails/issues/2582 (with testcase)
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/rake_test.rb | 18 |
1 files changed, 17 insertions, 1 deletions
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 |