Merge pull request #886 from pwnall/font_paths
More font paths test coverage.
This commit is contained in:
commit
27a9fa98f7
|
@ -6,8 +6,10 @@ Feature: Web Fonts
|
|||
Then the following files should exist:
|
||||
| stylesheets/fonts.css |
|
||||
And the file "stylesheets/fonts.css" should contain "/fonts/StMarie-Thin.otf"
|
||||
And the file "stylesheets/fonts.css" should contain "/fonts/blank/blank.otf"
|
||||
|
||||
Scenario: Rendering scss
|
||||
Given the Server is running at "fonts-app"
|
||||
When I go to "/stylesheets/fonts.css"
|
||||
Then I should see "/fonts/StMarie-Thin.otf"
|
||||
And I should see "/fonts/blank/blank.otf"
|
||||
|
|
|
@ -89,6 +89,40 @@ Feature: Relative Assets
|
|||
And the Server is running at "fonts-app"
|
||||
When I go to "/stylesheets/fonts.css"
|
||||
Then I should see "url('../fonts/StMarie-Thin.otf"
|
||||
And I should see "url('../fonts/blank/blank.otf"
|
||||
|
||||
Scenario: Rendering scss with the feature enabled and a custom fonts_dir
|
||||
Given "relative_assets" feature is "enabled"
|
||||
And "fonts_dir" is set to "otf"
|
||||
And the Server is running at "fonts-app"
|
||||
When I go to "/stylesheets/fonts.css"
|
||||
Then I should not see "url('../fonts/StMarie-Thin.otf"
|
||||
And I should see "url('../otf/StMarie-Thin.otf"
|
||||
And I should see "url('../otf/blank/blank.otf"
|
||||
|
||||
Scenario: Building scss with the feature enabled
|
||||
Given a fixture app "fonts-app"
|
||||
And a file named "config.rb" with:
|
||||
"""
|
||||
activate :relative_assets
|
||||
"""
|
||||
Given a successfully built app at "fonts-app"
|
||||
When I cd to "build"
|
||||
Then the file "stylesheets/fonts.css" should contain "url('../fonts/StMarie-Thin.otf')"
|
||||
And the file "stylesheets/fonts.css" should contain "url('../fonts/blank/blank.otf')"
|
||||
|
||||
Scenario: Building scss with the feature enabled and a custom fonts_dir
|
||||
Given a fixture app "fonts-app"
|
||||
And a file named "config.rb" with:
|
||||
"""
|
||||
set :fonts_dir, "otf"
|
||||
activate :relative_assets
|
||||
"""
|
||||
Given a successfully built app at "fonts-app"
|
||||
When I cd to "build"
|
||||
Then the file "stylesheets/fonts.css" should not contain "url('../fonts/StMarie-Thin.otf')"
|
||||
And the file "stylesheets/fonts.css" should contain "url('../otf/StMarie-Thin.otf')"
|
||||
And the file "stylesheets/fonts.css" should contain "url('../otf/blank/blank.otf')"
|
||||
|
||||
Scenario: Relative assets via image_tag
|
||||
Given a fixture app "relative-assets-app"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import "compass/css3/font-face"
|
||||
|
||||
+font-face("St Marie", font-files("StMarie-Thin.otf", opentype))
|
||||
+font-face("St Marie", font-files("blank/blank.otf", opentype))
|
||||
|
||||
|
|
Loading…
Reference in a new issue