test/cli/commands/test_prune.rb in nanoc-4.0.0b1 vs test/cli/commands/test_prune.rb in nanoc-4.0.0b2

- old
+ new

@@ -2,11 +2,11 @@ class Nanoc::CLI::Commands::PruneTest < Nanoc::TestCase def test_run_without_yes with_site do |_site| # Set output dir - File.open('nanoc.yaml', 'w') { |io| io.write 'output_dir: output2' } + File.open('nanoc.yaml', 'w') { |io| io.write "output_dir: output2\nstring_pattern_type: legacy\n" } FileUtils.mkdir_p('output2') # Create source files File.open('content/index.html', 'w') { |io| io.write 'stuff' } @@ -24,11 +24,18 @@ end def test_run_with_yes with_site do |_site| # Set output dir - File.open('nanoc.yaml', 'w') { |io| io.write 'output_dir: output2' } + File.open('nanoc.yaml', 'w') do |io| + io << 'output_dir: output2' << "\n" + io << 'string_pattern_type: legacy' << "\n" + io << 'data_sources:' << "\n" + io << ' -' << "\n" + io << ' type: filesystem_unified' << "\n" + io << ' identifier_type: legacy' << "\n" + end FileUtils.mkdir_p('output2') # Create source files File.open('content/index.html', 'w') { |io| io.write 'stuff' } @@ -44,11 +51,11 @@ end def test_run_with_dry_run with_site do |_site| # Set output dir - File.open('nanoc.yaml', 'w') { |io| io.write 'output_dir: output2' } + File.open('nanoc.yaml', 'w') { |io| io.write "string_pattern_type: legacy\noutput_dir: output2" } FileUtils.mkdir_p('output2') # Create source files File.open('content/index.html', 'w') { |io| io.write 'stuff' } @@ -64,10 +71,18 @@ end def test_run_with_exclude with_site do |_site| # Set output dir - File.open('nanoc.yaml', 'w') { |io| io.write "prune:\n exclude: [ 'good-dir', 'good-file.html' ]" } + File.open('nanoc.yaml', 'w') do |io| + io << 'prune:' << "\n" + io << ' exclude: [ "good-dir", "good-file.html" ]' << "\n" + io << 'string_pattern_type: legacy' << "\n" + io << 'data_sources:' << "\n" + io << ' -' << "\n" + io << ' type: filesystem_unified' << "\n" + io << ' identifier_type: legacy' << "\n" + end FileUtils.mkdir_p('output') # Create source files File.open('content/index.html', 'w') { |io| io.write 'stuff' }