diff options
author | Sam Pohlenz <sam@sampohlenz.com> | 2011-10-03 16:06:04 +1030 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-10-03 11:18:49 +0200 |
commit | 6f429f375e43529f2dd1a2f37cbaabeef40c6ea9 (patch) | |
tree | bdb2cf52470e847547311b82efdd48e3b616639d /railties | |
parent | 0e1f7e0058bc06d9a9356f5b2a1e06447c024f46 (diff) | |
download | rails-6f429f375e43529f2dd1a2f37cbaabeef40c6ea9.tar.gz rails-6f429f375e43529f2dd1a2f37cbaabeef40c6ea9.tar.bz2 rails-6f429f375e43529f2dd1a2f37cbaabeef40c6ea9.zip |
Ensure that enhancements to assets:precompile task are only run once
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/assets_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index d0713620bd..6fd8808aaa 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -419,6 +419,12 @@ module ApplicationTests assert_equal "NoPost;\n", File.read("#{app_path}/public/assets/application.js") end + test "enhancements to assets:precompile should only run once" do + app_file "lib/tasks/enhance.rake", "Rake::Task['assets:precompile'].enhance { puts 'enhancement' }" + output = precompile! + assert_equal 1, output.scan("enhancement").size + end + private def app_with_assets_in_view |