Sha256: a7f7b40f6de6280992ec3610dee1eb2f9af0c20d66811fd1d71a3d4e4fcc34af
Contents?: true
Size: 773 Bytes
Versions: 22
Compression:
Stored size: 773 Bytes
Contents
describe 'GH-769', site: true do before do File.write('content/index.md', 'Index!') File.write('content/donkey.md', 'Donkey! [<%= @item.parent.identifier %>]') File.open('nanoc.yaml', 'w') do |io| io << 'string_pattern_type: legacy' << "\n" io << 'data_sources:' << "\n" io << ' -' << "\n" io << ' type: filesystem' << "\n" io << ' identifier_type: legacy' << "\n" end File.write('Rules', <<EOS) compile '*' do filter :erb write item.identifier + 'index.html' end layout '/foo.*', :erb EOS end it 'finds the parent if the parent is root' do site = Nanoc::Int::SiteLoader.new.new_from_cwd site.compile expect(File.read('output/donkey/index.html')).to eql('Donkey! [/]') end end
Version data entries
22 entries across 22 versions & 1 rubygems