middleman/middleman-more/features/sass_partials.feature

83 lines
2.4 KiB
Gherkin
Raw Normal View History

Feature: Sass Updates and Partials
Scenario: The preview server should update stylesheets when Sass changes
Given the Server is running at "preview-app"
And the file "source/stylesheets/plain.css.sass" has the contents
"""
red
color: red
"""
When I go to "/stylesheets/plain.css"
Then I should see "color: red;"
And the file "source/stylesheets/plain.css.sass" has the contents
"""
red
color: blue
"""
When I go to "/stylesheets/plain.css"
Then I should see "color: blue;"
Scenario: The preview server should update stylesheets when Sass partials change
2011-12-27 09:45:17 +01:00
Given the Server is running at "preview-app"
And the file "source/stylesheets/main.css.sass" has the contents
"""
@import partial.sass
red
color: red
"""
And the file "source/stylesheets/_partial.sass" has the contents
"""
body
font-size: 14px
"""
When I go to "/stylesheets/main.css"
Then I should see "color: red;"
And I should see "font-size: 14px;"
And the file "source/stylesheets/main.css.sass" has the contents
"""
@import partial.sass
red
color: blue
"""
And the file "source/stylesheets/_partial.sass" has the contents
"""
body
font-size: 18px
"""
When I go to "/stylesheets/main.css"
Then I should see "color: blue;"
And I should see "font-size: 18px"
2011-12-27 09:45:17 +01:00
Scenario: The preview server should update stylesheets when Sprockets partials change
Given the Server is running at "preview-app"
And the file "source/stylesheets/main2.css.sass" has the contents
"""
//= require "_partial2.css.sass"
red
color: red
"""
2011-12-27 09:45:17 +01:00
And the file "source/stylesheets/_partial2.css.sass" has the contents
"""
body
font-size: 14px
"""
When I go to "/stylesheets/main2.css"
Then I should see "color: red;"
2011-12-27 09:45:17 +01:00
Then I should see "font-size: 14px"
And the file "source/stylesheets/main2.css.sass" has the contents
"""
//= require "_partial2.css.sass"
red
color: blue
"""
2011-12-27 09:45:17 +01:00
And the file "source/stylesheets/_partial2.css.sass" has the contents
"""
body
font-size: 18px
"""
When I go to "/stylesheets/main2.css"
Then I should see "color: blue;"
Then I should see "font-size: 18px"