fix relative assets test
This commit is contained in:
parent
91e00e5289
commit
bfc32ee0ef
|
@ -1,17 +1,11 @@
|
||||||
Feature: Web Fonts
|
Feature: Web Fonts
|
||||||
|
|
||||||
Scenario: Checking built folder for content
|
Scenario: Checking built folder for content
|
||||||
Given a built app at "test-app"
|
Given a built app at "fonts-app"
|
||||||
Then "stylesheets/fonts.css" should exist at "test-app" and include "/fonts/StMarie-Thin.otf"
|
Then "stylesheets/fonts.css" should exist at "fonts-app" and include "/fonts/StMarie-Thin.otf"
|
||||||
And cleanup built app at "test-app"
|
And cleanup built app at "fonts-app"
|
||||||
|
|
||||||
Scenario: Rendering scss
|
Scenario: Rendering scss
|
||||||
Given the Server is running at "test-app"
|
Given the Server is running at "fonts-app"
|
||||||
When I go to "/stylesheets/fonts.css"
|
When I go to "/stylesheets/fonts.css"
|
||||||
Then I should see "/fonts/StMarie-Thin.otf"
|
Then I should see "/fonts/StMarie-Thin.otf"
|
||||||
|
|
||||||
Scenario: Rendering scss with the feature enabled
|
|
||||||
Given "relative_assets" feature is "enabled"
|
|
||||||
And the Server is running at "test-app"
|
|
||||||
When I go to "/stylesheets/fonts.css"
|
|
||||||
Then I should see "url('../fonts/StMarie"
|
|
|
@ -20,7 +20,7 @@ Feature: Relative Assets
|
||||||
When I go to "/stylesheets/relative_assets.css"
|
When I go to "/stylesheets/relative_assets.css"
|
||||||
Then I should see "url('../images/blank.gif"
|
Then I should see "url('../images/blank.gif"
|
||||||
|
|
||||||
Scenario: Rendering html with the feature disabled
|
Scenario: Rendering html with the feature enabled
|
||||||
Given "relative_assets" feature is "enabled"
|
Given "relative_assets" feature is "enabled"
|
||||||
And the Server is running at "test-app"
|
And the Server is running at "test-app"
|
||||||
When I go to "/relative_image.html"
|
When I go to "/relative_image.html"
|
||||||
|
@ -42,3 +42,9 @@ Feature: Relative Assets
|
||||||
Then I should not see "/images/blank.gif"
|
Then I should not see "/images/blank.gif"
|
||||||
Then I should not see "/img/blank.gif"
|
Then I should not see "/img/blank.gif"
|
||||||
And I should 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"
|
||||||
|
When I go to "/stylesheets/fonts.css"
|
||||||
|
Then I should see "url('../fonts/StMarie"
|
|
@ -1,9 +1,16 @@
|
||||||
Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state|
|
Given /^a clean server$/ do
|
||||||
@server ||= Middleman.server
|
@server = Middleman.server
|
||||||
@server.set :show_exceptions, false
|
@server.set :show_exceptions, false
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state|
|
||||||
|
@server = Middleman.server
|
||||||
|
@server.set :show_exceptions, false
|
||||||
|
|
||||||
if state == "enabled"
|
if state == "enabled"
|
||||||
@server.activate(feature.to_sym)
|
@server.activate(feature.to_sym)
|
||||||
end
|
end
|
||||||
|
|
||||||
@server.set :environment, @current_env || :development
|
@server.set :environment, @current_env || :development
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
0
fixtures/fonts-app/config.rb
Normal file
0
fixtures/fonts-app/config.rb
Normal file
Loading…
Reference in a new issue