diff options
author | Xavier Noria <fxn@hashref.com> | 2010-04-03 10:56:15 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-04-03 10:56:15 -0700 |
commit | 11161e6c96fb6686a33e05ead106b96089ff9790 (patch) | |
tree | 35d5618f1a866ce8ba11efd8e6851d2fd7bbf5fc /actionpack/test/template/asset_tag_helper_test.rb | |
parent | 4996d1a445acd965d0064500ad00d692a742f669 (diff) | |
parent | 467d251c3dcbd3e4dd1e785a21d63535b795a64c (diff) | |
download | rails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.gz rails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.bz2 rails-11161e6c96fb6686a33e05ead106b96089ff9790.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index fbd504ae7d..223a430f92 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -34,9 +34,7 @@ class AssetTagHelperTest < ActionView::TestCase ) end - @controller = Class.new(BasicController) do - def url_for(*args) "http://www.example.com" end - end.new + @controller = BasicController.new @request = Class.new do def protocol() 'http://' end @@ -49,6 +47,10 @@ class AssetTagHelperTest < ActionView::TestCase ActionView::Helpers::AssetTagHelper::reset_javascript_include_default end + def url_for(*args) + "http://www.example.com" + end + def teardown config.perform_caching = false ENV.delete('RAILS_ASSET_ID') @@ -893,25 +895,19 @@ class AssetTagHelperNonVhostTest < ActionView::TestCase def setup super - @controller = Class.new(BasicController) do - def url_for(options) - "http://www.example.com/collaboration/hieraki" - end - end.new - + @controller = BasicController.new @controller.config.relative_url_root = "/collaboration/hieraki" - @request = Class.new do - def protocol - 'gopher://' - end - end.new - + @request = Struct.new(:protocol).new("gopher://") @controller.request = @request ActionView::Helpers::AssetTagHelper::reset_javascript_include_default end + def url_for(options) + "http://www.example.com/collaboration/hieraki" + end + def test_should_compute_proper_path assert_dom_equal(%(<link href="http://www.example.com/collaboration/hieraki" rel="alternate" title="RSS" type="application/rss+xml" />), auto_discovery_link_tag) assert_dom_equal(%(/collaboration/hieraki/javascripts/xmlhr.js), javascript_path("xmlhr")) |