diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-06 11:42:29 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-06 11:42:29 -0700 |
commit | 61913684a2be30190b49d4f8ac3314b3f2556273 (patch) | |
tree | 9ac63f3a31c6688f2e6a2226a93a5174d1e8d4d6 /railties/test | |
parent | 2c72830cd97d3746dc02db71441e888678f10a86 (diff) | |
parent | 139971d3cc06168a69617a61058240afe227af99 (diff) | |
download | rails-61913684a2be30190b49d4f8ac3314b3f2556273.tar.gz rails-61913684a2be30190b49d4f8ac3314b3f2556273.tar.bz2 rails-61913684a2be30190b49d4f8ac3314b3f2556273.zip |
Merge pull request #1926 from tobsch/master
Accept application.js/.css to exist in a deeper directory depth by default
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/assets_test.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index b76dae8e18..afe93aa732 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -37,14 +37,17 @@ module ApplicationTests test "assets are compiled properly" do app_file "app/assets/javascripts/application.js", "alert();" + app_file "app/assets/javascripts/foo/application.js", "alert();" capture(:stdout) do Dir.chdir(app_path){ `bundle exec rake assets:precompile` } end - - file = Dir["#{app_path}/public/assets/application-*.js"][0] - assert_not_nil file, "Expected application.js asset to be generated, but none found" - assert_equal "alert();\n", File.read(file) + files = Dir["#{app_path}/public/assets/application-*.js"] + files << Dir["#{app_path}/public/assets/foo/application-*.js"].first + files.each do |file| + assert_not_nil file, "Expected application.js asset to be generated, but none found" + assert_equal "alert();\n", File.read(file) + end end test "assets are cleaned up properly" do |