middleman/middleman-core/features/builder.feature

58 lines
2.5 KiB
Gherkin
Raw Permalink Normal View History

Feature: Builder
In order to output static html and css for delivery
Scenario: Checking built folder for content
Given a successfully built app at "large-build-app"
When I cd to "build"
Then the following files should exist:
| index.html |
| static.html |
| services/index.html |
| stylesheets/static.css |
| images/blank.gif |
| images/Read me (example).txt |
| images/Child folder/regular_file(example).txt |
| .htaccess |
2013-01-19 02:13:49 +01:00
| .htpasswd |
| feed.xml |
Then the following files should not exist:
| _partial |
| layout |
| layouts/custom |
| layouts/content_for |
And the file "index.html" should contain "Comment in layout"
And the file "index.html" should contain "<h1>Welcome</h1>"
And the file "static.html" should contain "Static, no code!"
And the file "services/index.html" should contain "Services"
And the file "stylesheets/static.css" should contain "body"
2011-09-13 01:15:51 +02:00
Scenario: Build glob
2011-12-16 01:33:09 +01:00
Given a successfully built app at "glob-app" with flags "--glob '*.css'"
When I cd to "build"
Then the following files should not exist:
| index.html |
Then the following files should exist:
| stylesheets/site.css |
Scenario: Build with errors
Given a built app at "build-with-errors-app"
Then the exit status should be 1
Scenario: Build empty errors
Given a built app at "empty-app"
Then the exit status should be 1
2011-12-21 21:13:28 +01:00
Scenario: Build alias (b)
Given a fixture app "large-build-app"
2011-12-21 21:13:28 +01:00
When I run `middleman b`
Then was successfully built
Scenario: Builded text file(ex: html, css, xml, txt)'s permission is 0644
Given a successfully built app at "large-build-app"
When I cd to "build"
Then the mode of filesystem object "index.html" should match "0644"
And the mode of filesystem object "stylesheets/static.css" should match "0644"
And the mode of filesystem object "feed.xml" should match "0644"
And the mode of filesystem object ".htaccess" should match "0644"