提交 3ce83027 编写于 作者: K kennyj
上级 ef14a0ec
......@@ -42,7 +42,7 @@ namespace :assets do
end
end
File.open("#{manifest_path}/manifest.yml", 'w') do |f|
File.open("#{manifest_path}/manifest.yml", 'wb') do |f|
YAML.dump(manifest, f)
end
end
......
# coding:utf-8
require "isolation/abstract_unit"
module ApplicationTests
......@@ -244,5 +245,20 @@ def test_scaffold_tests_pass_by_default
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册