Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let RulesModified check dependent objects as well
- Loading branch information
1 parent
4ac8df1
commit deccf81
Showing
2 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
describe 'GH-1372', site: true, stdio: true do | ||
before do | ||
FileUtils.mkdir_p('content') | ||
File.write('content/home.erb', 'hello') | ||
|
||
FileUtils.mkdir_p('layouts') | ||
File.write('layouts/default.haml', '#main= yield') | ||
|
||
File.write('Rules', <<~EOS) | ||
compile '/*' do | ||
layout '/default.*' | ||
write ext: 'html' | ||
end | ||
layout '/**/*', :haml, remove_whitespace: false | ||
EOS | ||
end | ||
|
||
example do | ||
Nanoc::CLI.run(['--verbose']) | ||
|
||
File.write('Rules', <<~EOS) | ||
compile '/*' do | ||
layout '/default.*' | ||
write ext: 'html' | ||
end | ||
layout '/**/*', :haml, remove_whitespace: true | ||
EOS | ||
|
||
expect { Nanoc::CLI.run(['--verbose']) } | ||
.to output(%r{update.*output/home\.html$}).to_stdout | ||
end | ||
end |