mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Merge pull request #231 from bhollis/ignore
Scenarios to test proposed "ignore" behavior
This commit is contained in:
commit
309f8dd966
12 changed files with 50 additions and 4 deletions
50
middleman-core/features/ignore.feature
Normal file
50
middleman-core/features/ignore.feature
Normal file
|
@ -0,0 +1,50 @@
|
|||
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 |
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
page "/my_article.html", :proxy => "/template.html", :ignore => true, :layout => false
|
||||
page "/articles/my_article.html", :proxy => "/articles/template.html", :ignore => true, :layout => false
|
0
middleman-core/fixtures/ignore-app/source/about.html.erb
Normal file
0
middleman-core/fixtures/ignore-app/source/about.html.erb
Normal file
|
@ -1 +0,0 @@
|
|||
<%= [1,2,3].join("-") %>
|
0
middleman-core/fixtures/ignore-app/source/images/pic.png
Normal file
0
middleman-core/fixtures/ignore-app/source/images/pic.png
Normal file
0
middleman-core/fixtures/ignore-app/source/index.html.erb
Normal file
0
middleman-core/fixtures/ignore-app/source/index.html.erb
Normal file
0
middleman-core/fixtures/ignore-app/source/plain.html
Normal file
0
middleman-core/fixtures/ignore-app/source/plain.html
Normal file
|
@ -1 +0,0 @@
|
|||
<%= [1,2,3].join("-") %>
|
Loading…
Reference in a new issue