test/extra/checking/test_check.rb in nanoc-4.0.0b2 vs test/extra/checking/test_check.rb in nanoc-4.0.0b3
- old
+ new
@@ -1,22 +1,18 @@
-# encoding: utf-8
-
class Nanoc::Extra::Checking::CheckTest < Nanoc::TestCase
def test_output_filenames
with_site do |site|
- check = Nanoc::Extra::Checking::Check.new(site)
- assert check.output_filenames.empty?
File.open('output/foo.html', 'w') { |io| io.write 'hello' }
+ check = Nanoc::Extra::Checking::Check.create(site)
assert_equal ['output/foo.html'], check.output_filenames
end
end
def test_no_output_dir
with_site do |site|
site.config[:output_dir] = 'non-existent'
- check = Nanoc::Extra::Checking::Check.new(site)
assert_raises Nanoc::Extra::Checking::OutputDirNotFoundError do
- check.output_filenames
+ Nanoc::Extra::Checking::Check.create(site)
end
end
end
end