2011-10-15 20:21:56 +02:00
|
|
|
Feature: Build Clean
|
|
|
|
Scenario: Build and Clean an app
|
2011-12-16 01:33:09 +01:00
|
|
|
Given a fixture app "clean-app"
|
|
|
|
And app "clean-app" is using config "empty"
|
2013-04-13 22:52:22 +02:00
|
|
|
And a successfully built app at "clean-app" with flags "--no-clean"
|
2012-01-04 09:20:25 +01:00
|
|
|
Then the following files should exist:
|
|
|
|
| build/index.html |
|
|
|
|
| build/should_be_ignored.html |
|
|
|
|
| build/should_be_ignored2.html |
|
|
|
|
| build/should_be_ignored3.html |
|
2011-10-15 20:21:56 +02:00
|
|
|
And app "clean-app" is using config "complications"
|
2013-04-13 22:52:22 +02:00
|
|
|
Given a successfully built app at "clean-app"
|
2011-12-16 01:33:09 +01:00
|
|
|
Then the following files should not exist:
|
2012-01-04 09:20:25 +01:00
|
|
|
| build/should_be_ignored.html |
|
|
|
|
| build/should_be_ignored2.html |
|
|
|
|
| build/should_be_ignored3.html |
|
|
|
|
And the file "build/index.html" should contain "Comment in layout"
|
2011-12-01 07:47:07 +01:00
|
|
|
|
2012-01-04 09:20:25 +01:00
|
|
|
Scenario: Clean build an app with newly ignored files and a nested output directory
|
2013-06-01 03:20:15 +02:00
|
|
|
Given a fixture app "clean-nested-app"
|
|
|
|
When a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
set :build_dir, "sub/dir"
|
|
|
|
"""
|
2013-04-13 22:52:22 +02:00
|
|
|
Given a built app at "clean-nested-app" with flags "--no-clean"
|
2012-01-04 09:20:25 +01:00
|
|
|
Then a directory named "sub/dir" should exist
|
2013-06-01 03:20:15 +02:00
|
|
|
Then the following directories should exist:
|
|
|
|
| sub/dir |
|
|
|
|
| sub/dir/nested |
|
2012-01-04 09:20:25 +01:00
|
|
|
Then the following files should exist:
|
2013-06-01 03:20:15 +02:00
|
|
|
| sub/dir/about.html |
|
|
|
|
| sub/dir/nested/nested.html |
|
|
|
|
When a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
set :build_dir, "sub/dir"
|
|
|
|
ignore 'about.html'
|
|
|
|
ignore 'nested/*'
|
|
|
|
"""
|
2013-04-13 22:52:22 +02:00
|
|
|
Given a built app at "clean-nested-app"
|
2013-06-01 03:20:15 +02:00
|
|
|
Then the following directories should not exist:
|
|
|
|
| sub/dir/nested |
|
2012-01-04 09:20:25 +01:00
|
|
|
Then the following files should not exist:
|
2013-06-01 03:20:15 +02:00
|
|
|
| sub/dir/about.html |
|
|
|
|
| sub/dir/nested/nested.html |
|
2015-09-30 14:23:27 +02:00
|
|
|
|
|
|
|
Scenario: Build and clean an app under a hidden directory
|
|
|
|
Given a fixture app "clean-app"
|
|
|
|
And app "clean-app" is using config "hidden-dir-before"
|
|
|
|
And a built app at "clean-app"
|
|
|
|
Then the following files should exist:
|
|
|
|
| .build/index.html |
|
|
|
|
| .build/should_be_ignored.html |
|
|
|
|
| .build/should_be_ignored2.html |
|
|
|
|
| .build/should_be_ignored3.html |
|
|
|
|
Given app "clean-app" is using config "hidden-dir-after"
|
|
|
|
And a built app at "clean-app"
|
|
|
|
Then the following files should exist:
|
|
|
|
| .build/index.html |
|
|
|
|
And the following files should not exist:
|
|
|
|
| .build/should_be_ignored.html |
|
|
|
|
| .build/should_be_ignored2.html |
|
|
|
|
| .build/should_be_ignored3.html |
|