aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/sprockets_helper_test.rb
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2013-01-10 12:43:57 -0800
committerGuillermo Iguaran <guilleiguaran@gmail.com>2013-01-10 12:43:57 -0800
commit686307cd90cd2153f73bd60a3810411584d3f6d3 (patch)
tree304970821fb3cecfc7062555d83c8a25090387d8 /actionpack/test/template/sprockets_helper_test.rb
parent002dfba66490d289bac897d1ba886310a672e779 (diff)
parent9bc5e6517c409d1fa71ba704bbf514afdbc0831b (diff)
downloadrails-686307cd90cd2153f73bd60a3810411584d3f6d3.tar.gz
rails-686307cd90cd2153f73bd60a3810411584d3f6d3.tar.bz2
rails-686307cd90cd2153f73bd60a3810411584d3f6d3.zip
Merge pull request #8756 from causes/js_include_tag_fix
Fix javascript_include_tag when no js runtime is available
Diffstat (limited to 'actionpack/test/template/sprockets_helper_test.rb')
-rw-r--r--actionpack/test/template/sprockets_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb
index 01dd66aa1f..93832c7bd9 100644
--- a/actionpack/test/template/sprockets_helper_test.rb
+++ b/actionpack/test/template/sprockets_helper_test.rb
@@ -270,6 +270,13 @@ class SprocketsHelperTest < ActionView::TestCase
javascript_include_tag(:application, :extra)
end
+ test "precompiled assets with an extension when no JS runtime is available" do
+ @config.assets.compile = false
+ @config.assets.digests = {'foo.min.js' => 'foo.min-f00.js'}
+ Sprockets::Index.any_instance.stubs(:build_asset).raises
+ assert_nothing_raised { javascript_include_tag('foo.min') }
+ end
+
test "stylesheet path through asset_path" do
assert_match %r{/assets/application-[0-9a-f]+.css}, asset_path(:application, :ext => "css")