middleman/middleman-core/features/ignore.feature
Ben Hollis cebb15c9ca Add a new (failing) feature test to show the behavior I think would be good for the "ignore" helper.
These scenarios show ignoring files by their source paths rather than their output paths,
ignoring globbed paths (including into subdirectories), and ignoring paths that will be transformed
by directory_indexes. These scenarios pertain to issues #229 and #225.
2012-01-06 22:43:32 -08:00

51 lines
1.5 KiB
Gherkin

Feature: Ignoring paths
Scenario: Ignore a single path
Given a fixture app "ignore-app"
And a file named "config.rb" with:
"""
ignore 'about.html.erb'
ignore 'plain.html'
"""
And a successfully built app at "ignore-app"
Then the following files should exist:
| build/index.html |
And the following files should not exist:
| build/plain.html |
| build/about.html |
Scenario: Ignore a globbed path
Given a fixture app "ignore-app"
And a file named "config.rb" with:
"""
ignore '*.erb'
ignore 'reports/*'
ignore 'images/**/*.png'
"""
And a successfully built app at "ignore-app"
Then the following files should exist:
| build/plain.html |
| build/images/portrait.jpg |
And the following files should not exist:
| build/about.html |
| build/index.html |
| build/reports/index.html |
| build/reports/another.html |
| build/images/pic.png |
| build/images/icons/messages.png |
Scenario: Ignore with directory indexes
Given a fixture app "ignore-app"
And a file named "config.rb" with:
"""
activate :directory_indexes
ignore 'about.html.erb'
ignore 'plain.html'
"""
And a successfully built app at "ignore-app"
Then the following files should exist:
| build/index.html |
And the following files should not exist:
| build/about/index.html |
| build/plain/index.html |