mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
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"
|
|
@ -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"
|
||||
|
@ -42,3 +42,9 @@ Feature: Relative Assets
|
|||
Then I should not see "/images/blank.gif"
|
||||
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"
|
||||
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
|
||||
|
||||
@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