-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Allow periods in identifiers for full identifiers
- Loading branch information
Showing
3 changed files
with
61 additions
and
3 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,24 @@ | ||
describe 'GH-1022', site: true, stdio: true do | ||
before do | ||
File.write('content/ubuntu-16.10-server-amd64.iso.txt', 'torrent contents') | ||
File.write('content/ubuntu-16.10-server-amd64.iso.yaml', 'distro: Ubuntu') | ||
|
||
File.write('layouts/default.erb', '<%= @item[:distro] %> / <%= yield %>') | ||
|
||
File.write('Rules', <<EOS) | ||
compile '/**/*' do | ||
layout '/default.*' | ||
write item.identifier | ||
end | ||
layout '/*.erb', :erb | ||
EOS | ||
end | ||
|
||
it 'recompiles all reps of a changed item' do | ||
Nanoc::CLI.run(%w(compile)) | ||
|
||
expect(File.file?('output/ubuntu-16.10-server-amd64.iso.txt')).to be | ||
expect(File.read('output/ubuntu-16.10-server-amd64.iso.txt')).to eq('Ubuntu / torrent contents') | ||
end | ||
end |
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