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