From 77d8f7a4b71d7f52a7ba6f8bc7f7f6f6ac9b81e0 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 29 Mar 2011 21:40:24 -0500 Subject: Seperate asset directories --- actionpack/test/template/sprockets_helper_test.rb | 33 ++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index f6fd4f5bb4..67aee86d02 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -20,7 +20,10 @@ class SprocketsHelperTest < ActionView::TestCase @controller.request = @request @assets = Sprockets::Environment.new - @assets.paths << FIXTURES.join("sprockets/app/assets") + @assets.paths << FIXTURES.join("sprockets/app/javascripts") + @assets.paths << FIXTURES.join("sprockets/app/stylesheets") + + config.perform_caching = true end def url_for(*args) @@ -28,12 +31,12 @@ class SprocketsHelperTest < ActionView::TestCase end test "javascript path" do - assert_equal "/javascripts/application-d41d8cd98f00b204e9800998ecf8427e.js", + assert_equal "/assets/application-d41d8cd98f00b204e9800998ecf8427e.js", sprockets_javascript_path(:application) - assert_equal "/javascripts/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js", + assert_equal "/assets/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js", sprockets_javascript_path("xmlhr") - assert_equal "/javascripts/dir/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js", + assert_equal "/assets/dir/xmlhr-d41d8cd98f00b204e9800998ecf8427e.js", sprockets_javascript_path("dir/xmlhr.js") assert_equal "/dir/xmlhr.js", @@ -46,24 +49,24 @@ class SprocketsHelperTest < ActionView::TestCase end test "javascript include tag" do - assert_equal '', + assert_equal '', sprockets_javascript_include_tag(:application) - assert_equal '', + assert_equal '', sprockets_javascript_include_tag("xmlhr") - assert_equal '', + assert_equal '', sprockets_javascript_include_tag("xmlhr.js") assert_equal '', sprockets_javascript_include_tag("http://www.railsapplication.com/xmlhr") end test "stylesheet path" do - assert_equal "/stylesheets/application-d41d8cd98f00b204e9800998ecf8427e.css", + assert_equal "/assets/application-d41d8cd98f00b204e9800998ecf8427e.css", sprockets_stylesheet_path(:application) - assert_equal "/stylesheets/style-d41d8cd98f00b204e9800998ecf8427e.css", + assert_equal "/assets/style-d41d8cd98f00b204e9800998ecf8427e.css", sprockets_stylesheet_path("style") - assert_equal "/stylesheets/dir/style-d41d8cd98f00b204e9800998ecf8427e.css", + assert_equal "/assets/dir/style-d41d8cd98f00b204e9800998ecf8427e.css", sprockets_stylesheet_path("dir/style.css") assert_equal "/dir/style.css", sprockets_stylesheet_path("/dir/style.css") @@ -75,19 +78,19 @@ class SprocketsHelperTest < ActionView::TestCase end test "stylesheet link tag" do - assert_equal '', + assert_equal '', sprockets_stylesheet_link_tag(:application) - assert_equal '', + assert_equal '', sprockets_stylesheet_link_tag("style") - assert_equal '', + assert_equal '', sprockets_stylesheet_link_tag("style.css") assert_equal '', sprockets_stylesheet_link_tag("http://www.railsapplication.com/style.css") - assert_equal '', + assert_equal '', sprockets_stylesheet_link_tag("style", :media => "all") - assert_equal '', + assert_equal '', sprockets_stylesheet_link_tag("style", :media => "print") end end -- cgit v1.2.3