From added06d3f17f451a0c212b8c52129f05bc950fa Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Wed, 9 Oct 2019 19:48:13 -0700 Subject: [PATCH] Add a few more assertions --- railties/test/application/assets_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index ef98920c5c..8642b06534 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -43,6 +43,7 @@ module ApplicationTests 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 @@ -418,6 +419,7 @@ module ApplicationTests precompile! + assert_file_exists("#{app_path}/public/assets/application-*.js") assert_match(/Post;/, File.read(Dir["#{app_path}/public/assets/application-*.js"].first)) end