diff options
author | Alex Yakoubian <alex@simplevue.com> | 2011-09-14 23:14:23 -0700 |
---|---|---|
committer | Alex Yakoubian <alex@simplevue.com> | 2011-09-16 20:46:37 -0700 |
commit | 6e63e029b335b1a5dfce43c20de27ca6fae29fa4 (patch) | |
tree | 256b6216dd232ff930148d364f629b2907e4dfac /railties/test | |
parent | 18116791d00d693643db3b4a99ae1d245c5a6c33 (diff) | |
download | rails-6e63e029b335b1a5dfce43c20de27ca6fae29fa4.tar.gz rails-6e63e029b335b1a5dfce43c20de27ca6fae29fa4.tar.bz2 rails-6e63e029b335b1a5dfce43c20de27ca6fae29fa4.zip |
Default precompile regexp that properly matches application.js and application.css
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/assets_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index dfd950aae3..a62ef1e70e 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -68,6 +68,10 @@ module ApplicationTests test "precompile application.js and application.css and all other files not ending with .js or .css by default" do app_file "app/assets/javascripts/application.js", "alert();" app_file "app/assets/stylesheets/application.css", "body{}" + + app_file "app/assets/javascripts/someapplication.js", "alert();" + app_file "app/assets/stylesheets/someapplication.css", "body{}" + app_file "app/assets/javascripts/something.min.js", "alert();" app_file "app/assets/stylesheets/something.min.css", "body{}" @@ -87,8 +91,13 @@ module ApplicationTests images_should_compile.each do |filename| assert File.exists?("#{app_path}/public/assets/#{filename}") end + assert File.exists?("#{app_path}/public/assets/application.js") assert File.exists?("#{app_path}/public/assets/application.css") + + assert !File.exists?("#{app_path}/public/assets/someapplication.js") + assert !File.exists?("#{app_path}/public/assets/someapplication.css") + assert !File.exists?("#{app_path}/public/assets/something.min.js") assert !File.exists?("#{app_path}/public/assets/something.min.css") end |