diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2011-11-29 01:59:36 -0500 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2011-11-29 02:01:18 -0500 |
commit | d3bc12b27feb96e8799e2bcdc6e52b2704360aa3 (patch) | |
tree | ec77d3b5b742d1f7587ec262d36fb5f8b5d8e11e /actionpack/test | |
parent | 52a9884ce486dc97e0a8d88d0126ac6194d52346 (diff) | |
download | rails-d3bc12b27feb96e8799e2bcdc6e52b2704360aa3.tar.gz rails-d3bc12b27feb96e8799e2bcdc6e52b2704360aa3.tar.bz2 rails-d3bc12b27feb96e8799e2bcdc6e52b2704360aa3.zip |
Handle correctly optional parameters for callable asset_host.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/sprockets_helper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index 26a504beb8..64fdd53e73 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -41,6 +41,10 @@ class SprocketsHelperTest < ActionView::TestCase @controller ? @controller.config : @config end + def compute_host(source, request, options = {}) + raise "Should never get here" + end + test "asset_path" do assert_match %r{/assets/logo-[0-9a-f]+.png}, asset_path("logo.png") @@ -125,6 +129,10 @@ class SprocketsHelperTest < ActionView::TestCase assert_raises ActionController::RoutingError do asset_path("logo.png") end + @config.asset_host = method :compute_host + assert_raises ActionController::RoutingError do + asset_path("logo.png") + end end test "image_tag" do |