From 201e8986b15f4d815355e0ca96e02cf16dba9372 Mon Sep 17 00:00:00 2001 From: wycats Date: Sun, 28 Mar 2010 18:45:52 -0700 Subject: Updated asset_template_path to asset_path and have it also support a String [#4247 state:resolved] --- actionpack/test/template/asset_tag_helper_test.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 43d11df8fe..fbd504ae7d 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -373,8 +373,15 @@ class AssetTagHelperTest < ActionView::TestCase assert_equal %(Rails), image_tag("rails.png") end + def test_string_asset_id + @controller.config.asset_path = "/assets.v12345%s" + + expected_path = "/assets.v12345/images/rails.png" + assert_equal %(Rails), image_tag("rails.png") + end + def test_proc_asset_id - @controller.config.asset_path_template = Proc.new do |asset_path| + @controller.config.asset_path = Proc.new do |asset_path| "/assets.v12345#{asset_path}" end -- cgit v1.2.3