aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/sprockets_helper_test.rb
diff options
context:
space:
mode:
authorFred Wu <ifredwu@gmail.com>2013-03-20 16:13:30 +1100
committerFred Wu <ifredwu@gmail.com>2013-03-20 16:13:30 +1100
commit687e68d88f5e1a7bb6a2d876fbbc5b8c4571d853 (patch)
treec3d134c5da31e49ad109cbeb5c13b9ae3cd533b0 /actionpack/test/template/sprockets_helper_test.rb
parent517060ab59c383f912c1be838a6d36afb128288f (diff)
downloadrails-687e68d88f5e1a7bb6a2d876fbbc5b8c4571d853.tar.gz
rails-687e68d88f5e1a7bb6a2d876fbbc5b8c4571d853.tar.bz2
rails-687e68d88f5e1a7bb6a2d876fbbc5b8c4571d853.zip
Fixed assets loading performance in 3.2.13
The PR #8756 uses Sprockets for resolving files that already exists on disk, for those files their extensions don't need to be rewritten. Fixes #9803
Diffstat (limited to 'actionpack/test/template/sprockets_helper_test.rb')
-rw-r--r--actionpack/test/template/sprockets_helper_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb
index 93832c7bd9..7d5ac39d15 100644
--- a/actionpack/test/template/sprockets_helper_test.rb
+++ b/actionpack/test/template/sprockets_helper_test.rb
@@ -277,6 +277,15 @@ class SprocketsHelperTest < ActionView::TestCase
assert_nothing_raised { javascript_include_tag('foo.min') }
end
+ test "assets that exist on filesystem don't need to go through Sprockets" do
+ @config.assets.digest = false
+ @config.assets.debug = true
+
+ Rails.application.assets.expects(:resolve).never
+
+ asset_paths.asset_for(FIXTURES.join("sprockets/app/javascripts/foo.min.js").to_path, 'min')
+ end
+
test "stylesheet path through asset_path" do
assert_match %r{/assets/application-[0-9a-f]+.css}, asset_path(:application, :ext => "css")