test directory_index and relative_assets combo

This commit is contained in:
Thomas Reynolds 2012-04-16 16:52:21 -07:00
parent bd9814965e
commit dc784edc66
2 changed files with 19 additions and 2 deletions

View file

@ -39,6 +39,17 @@ Feature: Relative Assets
When I cd to "build"
Then the file "stylesheets/relative_assets.css" should contain "url('../images/blank.gif')"
Scenario: Relative css reference with directory indexes
Given a fixture app "relative-assets-app"
And a file named "config.rb" with:
"""
activate :directory_indexes
activate :relative_assets
"""
Given a successfully built app at "relative-assets-app"
When I cd to "build"
Then the file "relative_image/index.html" should contain "../stylesheets/relative_assets.css"
Scenario: Rendering html with the feature enabled
Given "relative_assets" feature is "enabled"
And the Server is running at "relative-assets-app"
@ -73,7 +84,6 @@ Feature: Relative Assets
Then I should not see "/img/blank.gif"
And I should see "img/blank.gif"
Scenario: Rendering scss with the feature enabled
Given "relative_assets" feature is "enabled"
And the Server is running at "fonts-app"

View file

@ -1 +1,8 @@
<html>
<head>
<%= stylesheet_link_tag :relative_assets %>
</head>
<body>
<%= image_tag "blank.gif" %>
</body>
</html>