test/cli/commands/test_prune.rb in nanoc-3.7.4 vs test/cli/commands/test_prune.rb in nanoc-3.7.5
- old
+ new
@@ -1,11 +1,10 @@
# encoding: utf-8
class Nanoc::CLI::Commands::PruneTest < Nanoc::TestCase
-
def test_run_without_yes
- with_site do |site|
+ with_site do |_site|
# Set output dir
File.open('nanoc.yaml', 'w') { |io| io.write 'output_dir: output2' }
FileUtils.mkdir_p('output2')
# Create source files
@@ -23,11 +22,11 @@
assert File.file?('output2/foo.html')
end
end
def test_run_with_yes
- with_site do |site|
+ with_site do |_site|
# Set output dir
File.open('nanoc.yaml', 'w') { |io| io.write 'output_dir: output2' }
FileUtils.mkdir_p('output2')
# Create source files
@@ -43,11 +42,11 @@
assert !File.file?('output2/foo.html')
end
end
def test_run_with_dry_run
- with_site do |site|
+ with_site do |_site|
# Set output dir
File.open('nanoc.yaml', 'w') { |io| io.write 'output_dir: output2' }
FileUtils.mkdir_p('output2')
# Create source files
@@ -63,11 +62,11 @@
assert File.file?('output2/foo.html')
end
end
def test_run_with_exclude
- with_site do |site|
+ with_site do |_site|
# Set output dir
File.open('nanoc.yaml', 'w') { |io| io.write "prune:\n exclude: [ 'good-dir', 'good-file.html' ]" }
FileUtils.mkdir_p('output')
# Create source files
@@ -96,11 +95,11 @@
skip_unless_symlinks_supported
if defined?(JRUBY_VERSION) && JRUBY_VERSION == '1.7.11'
skip 'JRuby 1.7.11 has buggy File.find behavior (see https://github.com/jruby/jruby/issues/1647)'
end
- with_site do |site|
+ with_site do |_site|
# Set output dir
FileUtils.rm_rf('output')
FileUtils.mkdir_p('output-real')
File.symlink('output-real', 'output')
@@ -119,11 +118,11 @@
assert !File.file?('output-real/some-file.html')
end
end
def test_run_with_nested_empty_dirs
- with_site do |site|
+ with_site do |_site|
# Set output dir
File.open('nanoc.yaml', 'w') { |io| io.write 'output_dir: output' }
FileUtils.mkdir_p('output')
# Create output files
@@ -136,7 +135,6 @@
assert !File.directory?('output/a/b/c')
assert !File.directory?('output/a/b')
assert !File.directory?('output/a')
end
end
-
end