1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/middleman-core/features/builder.feature
Thomas Reynolds 4c2b89bf41
Centralize file reading and avoid parsing non-template files for front matter (#2229)
* Centralize file reading

Be able to tell the difference between static files and templates

Check other places for static_file?

Allow pipelines to still operate on js/css

chmod after moving

* Fix check on frontmatter parsing

* Reuse var

* Fix mime check

* Handle non-file resources with  static  check

* Fix .php files and minification
2018-12-27 16:01:52 -08:00

61 lines
2.6 KiB
Gherkin

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 |
| .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"
Scenario: Build glob
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 not be 0
Scenario: Build empty errors
Given a built app at "empty-app"
Then was not successfully built
Scenario: Build external_pipeline errors
Given a built app at "external-pipeline-error"
Then the exit status should not be 0
Scenario: Build alias (b)
Given a fixture app "large-build-app"
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 file named "index.html" should have permissions "0644"
And the file named "stylesheets/static.css" should have permissions "0644"
And the file named "feed.xml" should have permissions "0644"
And the file named ".htaccess" should have permissions "0644"