2012-01-07 01:40:28 -05:00
|
|
|
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 |
|
2012-01-14 17:09:20 -05:00
|
|
|
| build/images/pic.png |
|
2012-01-07 01:40:28 -05:00
|
|
|
And the following files should not exist:
|
|
|
|
| build/about.html |
|
|
|
|
| build/index.html |
|
|
|
|
| build/reports/index.html |
|
|
|
|
| build/reports/another.html |
|
|
|
|
| build/images/icons/messages.png |
|
|
|
|
|
2012-01-14 15:21:35 -05:00
|
|
|
Scenario: Ignore with directory indexes (source file)
|
2012-01-07 01:40:28 -05:00
|
|
|
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 |
|
|
|
|
|
2012-01-14 15:21:35 -05:00
|
|
|
Scenario: Ignore with directory indexes (output path splat)
|
|
|
|
Given a fixture app "ignore-app"
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
activate :directory_indexes
|
|
|
|
ignore 'about*'
|
|
|
|
ignore 'plain*'
|
|
|
|
"""
|
|
|
|
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 |
|
|
|
|
|
2012-01-14 17:09:20 -05:00
|
|
|
# Scenario: Ignore with directory indexes (output path index)
|
|
|
|
# Given a fixture app "ignore-app"
|
|
|
|
# And a file named "config.rb" with:
|
|
|
|
# """
|
|
|
|
# activate :directory_indexes
|
|
|
|
# ignore 'about/index.html'
|
|
|
|
# ignore 'plain/index.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 |
|