diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-06 13:48:59 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-06 13:48:59 -0700 |
commit | 9cd1f697f1b4dded0f18e13c7ae12c7bd2dab1c0 (patch) | |
tree | 6a264a6b79db52141187d32434211943e5a94d93 /actionpack/test | |
parent | 02d31841bcf317d79925ca82dcc1bbf9079dc659 (diff) | |
parent | 0c4c7d94ed3e16a206bceced679fa129c9a254b8 (diff) | |
download | rails-9cd1f697f1b4dded0f18e13c7ae12c7bd2dab1c0.tar.gz rails-9cd1f697f1b4dded0f18e13c7ae12c7bd2dab1c0.tar.bz2 rails-9cd1f697f1b4dded0f18e13c7ae12c7bd2dab1c0.zip |
Merge pull request #7277 from sikachu/master-js-include-tag-fix
Do not include application.js if it doesn't exists
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index bcc55189b9..6a44197525 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -417,6 +417,15 @@ class AssetTagHelperTest < ActionView::TestCase assert_raise(ArgumentError) { javascript_include_tag(:defaults) } end + def test_all_javascript_expansion_not_include_application_js_if_not_exists + FileUtils.mv(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'application.js'), + File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'application.bak')) + assert_no_match(/application\.js/, javascript_include_tag(:all)) + ensure + FileUtils.mv(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'application.bak'), + File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'application.js')) + end + def test_stylesheet_path ENV["RAILS_ASSET_ID"] = "" StylePathToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) } |