test/helpers/test_capturing.rb in nanoc-3.7.4 vs test/helpers/test_capturing.rb in nanoc-3.7.5
- old
+ new
@@ -1,9 +1,8 @@
# encoding: utf-8
class Nanoc::Helpers::CapturingTest < Nanoc::TestCase
-
include Nanoc::Helpers::Capturing
def test_content_for
require 'erb'
@@ -103,11 +102,11 @@
assert_equal nil, content_for(@item, :a)
assert_equal 'Content Two', content_for(@item, :b)
end
def test_dependencies
- with_site do |site|
+ with_site do |_site|
# Prepare
File.open('lib/helpers.rb', 'w') do |io|
io.write 'include Nanoc::Helpers::Capturing'
end
File.open('content/includer.erb', 'w') do |io|
@@ -133,11 +132,11 @@
assert_equal '[New content]', File.read('output/includer/index.html')
end
end
def test_dependency_without_item_variable
- with_site do |site|
+ with_site do |_site|
# Prepare
File.open('lib/helpers.rb', 'w') do |io|
io.write "include Nanoc::Helpers::Capturing\n"
io.write "include Nanoc::Helpers::Rendering\n"
end
@@ -168,11 +167,11 @@
assert_equal '{[nil-New content]}', File.read('output/includer/index.html')
end
end
def test_self
- with_site do |site|
+ with_site do |_site|
File.open('lib/helpers.rb', 'w') do |io|
io.write 'include Nanoc::Helpers::Capturing'
end
File.open('content/self.erb', 'w') do |io|
@@ -189,11 +188,11 @@
assert_equal 'Foo!', File.read('output/self/index.html')
end
end
def test_recompile_dependency
- with_site do |site|
+ with_site do |_site|
# Prepare
File.open('lib/helpers.rb', 'w') do |io|
io.write 'include Nanoc::Helpers::Capturing'
end
File.open('content/includee.erb', 'w') do |io|
@@ -219,7 +218,6 @@
Nanoc::CLI.run(%w(compile))
assert_equal '{}', File.read('output/includee/index.html')
assert_equal 'New-Content', File.read('output/includer/index.html')
end
end
-
end