Skip to content
Browse files

Added test coverage for stylesheet_path to show that it works as requ…

…ested in #1471.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 93db2f3 commit 1e87d6e887639650e23db5fbba0ccdf0536f289c Marcel Molina committed Sep 28, 2005
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/test/template/asset_tag_helper_test.rb
View
4 actionpack/test/template/asset_tag_helper_test.rb
@@ -53,10 +53,14 @@ def relative_url_root
StylePathToTag = {
%(stylesheet_path("style")) => %(/stylesheets/style.css),
+ %(stylesheet_path('dir/file')) => %(/stylesheets/dir/file.css),
+ %(stylesheet_path('/dir/file')) => %(/dir/file.css)
}
StyleLinkToTag = {
%(stylesheet_link_tag("style")) => %(<link href="/stylesheets/style.css" media="screen" rel="Stylesheet" type="text/css" />),
+ %(stylesheet_link_tag("/dir/file")) => %(<link href="/dir/file.css" media="screen" rel="Stylesheet" type="text/css" />),
+ %(stylesheet_link_tag("dir/file")) => %(<link href="/stylesheets/dir/file.css" media="screen" rel="Stylesheet" type="text/css" />),
%(stylesheet_link_tag("style", :media => "all")) => %(<link href="/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />),
%(stylesheet_link_tag("random.styles", "/css/stylish")) => %(<link href="/stylesheets/random.styles" media="screen" rel="Stylesheet" type="text/css" />\n<link href="/css/stylish.css" media="screen" rel="Stylesheet" type="text/css" />)
}

0 comments on commit 1e87d6e

Please sign in to comment.
Something went wrong with that request. Please try again.