diff --git a/middleman-more/features/relative_assets.feature b/middleman-more/features/relative_assets.feature index ba06de53..7fef1c57 100644 --- a/middleman-more/features/relative_assets.feature +++ b/middleman-more/features/relative_assets.feature @@ -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" diff --git a/middleman-more/fixtures/relative-assets-app/source/relative_image.html.erb b/middleman-more/fixtures/relative-assets-app/source/relative_image.html.erb index fb441334..4fb9dc0c 100644 --- a/middleman-more/fixtures/relative-assets-app/source/relative_image.html.erb +++ b/middleman-more/fixtures/relative-assets-app/source/relative_image.html.erb @@ -1 +1,8 @@ -<%= image_tag "blank.gif" %> \ No newline at end of file + + + <%= stylesheet_link_tag :relative_assets %> + + + <%= image_tag "blank.gif" %> + + \ No newline at end of file