2009-11-23 00:37:11 +01:00
|
|
|
Feature: Relative Assets
|
|
|
|
In order easily switch between relative and absolute paths
|
|
|
|
|
|
|
|
Scenario: Rendering css with the feature disabled
|
|
|
|
Given "relative_assets" feature is "disabled"
|
2011-12-30 04:28:49 +01:00
|
|
|
And the Server is running at "relative-assets-app"
|
2009-11-23 00:37:11 +01:00
|
|
|
When I go to "/stylesheets/relative_assets.css"
|
2010-04-18 21:08:08 +02:00
|
|
|
Then I should not see "url('../"
|
2011-07-24 07:53:17 +02:00
|
|
|
And I should see "/images/blank.gif"
|
2011-07-24 07:49:32 +02:00
|
|
|
|
|
|
|
Scenario: Rendering html with the feature disabled
|
|
|
|
Given "relative_assets" feature is "disabled"
|
2011-12-30 04:28:49 +01:00
|
|
|
And the Server is running at "relative-assets-app"
|
2011-07-24 07:49:32 +02:00
|
|
|
When I go to "/relative_image.html"
|
|
|
|
Then I should see "/images/blank.gif"
|
2009-11-23 00:37:11 +01:00
|
|
|
|
|
|
|
Scenario: Rendering css with the feature enabled
|
|
|
|
Given "relative_assets" feature is "enabled"
|
2011-12-30 04:28:49 +01:00
|
|
|
And the Server is running at "relative-assets-app"
|
2009-11-23 00:37:11 +01:00
|
|
|
When I go to "/stylesheets/relative_assets.css"
|
2011-07-24 07:49:32 +02:00
|
|
|
Then I should see "url('../images/blank.gif"
|
|
|
|
|
2011-09-20 19:21:38 +02:00
|
|
|
Scenario: Rendering html with the feature enabled
|
2011-07-24 07:49:32 +02:00
|
|
|
Given "relative_assets" feature is "enabled"
|
2011-12-30 04:28:49 +01:00
|
|
|
And the Server is running at "relative-assets-app"
|
2011-07-24 07:49:32 +02:00
|
|
|
When I go to "/relative_image.html"
|
|
|
|
Then I should not see "/images/blank.gif"
|
|
|
|
And I should see "images/blank.gif"
|
|
|
|
|
|
|
|
Scenario: Rendering html with a custom images_dir
|
|
|
|
Given "relative_assets" feature is "enabled"
|
|
|
|
And "images_dir" is set to "img"
|
2011-12-30 04:28:49 +01:00
|
|
|
And the Server is running at "relative-assets-app"
|
2011-07-24 07:49:32 +02:00
|
|
|
When I go to "/stylesheets/relative_assets.css"
|
|
|
|
Then I should see "url('../img/blank.gif"
|
|
|
|
|
|
|
|
Scenario: Rendering css with a custom images_dir
|
|
|
|
Given "relative_assets" feature is "enabled"
|
|
|
|
And "images_dir" is set to "img"
|
2011-12-30 04:28:49 +01:00
|
|
|
And the Server is running at "relative-assets-app"
|
2011-07-24 07:49:32 +02:00
|
|
|
When I go to "/relative_image.html"
|
|
|
|
Then I should not see "/images/blank.gif"
|
|
|
|
Then I should not see "/img/blank.gif"
|
2011-09-20 19:21:38 +02:00
|
|
|
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"
|
|
|
|
When I go to "/stylesheets/fonts.css"
|
|
|
|
Then I should see "url('../fonts/StMarie"
|