未验证 提交 c2abbce9 编写于 作者: J John Hawthorn 提交者: Rafael Mendonça França

Remove a javascript from test

上级 aeadae2a
...@@ -238,14 +238,13 @@ class User < ActiveRecord::Base; raise 'should not be reached'; end ...@@ -238,14 +238,13 @@ class User < ActiveRecord::Base; raise 'should not be reached'; end
app_file "app/assets/images/rails.png", "notactuallyapng" app_file "app/assets/images/rails.png", "notactuallyapng"
remove_file "app/assets/stylesheets/application.css" remove_file "app/assets/stylesheets/application.css"
app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>" app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>"
app_file "app/assets/javascripts/application.js", "alert();"
precompile! precompile!
manifest = Dir["#{app_path}/public/assets/.sprockets-manifest-*.json"].first manifest = Dir["#{app_path}/public/assets/.sprockets-manifest-*.json"].first
assets = ActiveSupport::JSON.decode(File.read(manifest)) assets = ActiveSupport::JSON.decode(File.read(manifest))
assert_match(/application-([0-z]+)\.js/, assets["assets"]["application.js"])
assert_match(/application-([0-z]+)\.css/, assets["assets"]["application.css"]) assert_match(/application-([0-z]+)\.css/, assets["assets"]["application.css"])
assert_match(/rails-([0-z]+)\.png/, assets["assets"]["rails.png"])
end end
test "the manifest file should be saved by default in the same assets folder" do test "the manifest file should be saved by default in the same assets folder" do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册