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