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

Add a few more assertions

上级 b40705fa
......@@ -43,6 +43,7 @@ def clean_assets!
def assert_file_exists(filename)
globbed = Dir[filename]
assert Dir.exist?(File.dirname(filename)), "Directory #{File.dirname(filename)} does not exist"
assert globbed.one?, "Found #{globbed.size} files matching #{filename}. All files in the directory: #{Dir.entries(File.dirname(filename)).inspect}"
end
......@@ -432,6 +433,7 @@ class ::PostsController < ActionController::Base ; end
precompile!
assert_file_exists("#{app_path}/public/assets/application-*.js")
assert_match(/Post;/, File.read(Dir["#{app_path}/public/assets/application-*.js"].first))
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册