test/extra/checking/checks/test_css.rb in nanoc-4.0.0b2 vs test/extra/checking/checks/test_css.rb in nanoc-4.0.0b3

- old
+ new

@@ -1,18 +1,16 @@ -# encoding: utf-8 - class Nanoc::Extra::Checking::Checks::CSSTest < Nanoc::TestCase def test_run_ok VCR.use_cassette('css_run_ok') do with_site do |site| # Create files FileUtils.mkdir_p('output') File.open('output/blah.html', 'w') { |io| io.write('<h1>Hi!</h1>') } File.open('output/style.css', 'w') { |io| io.write('h1 { color: red; }') } # Run check - check = Nanoc::Extra::Checking::Checks::CSS.new(site) + check = Nanoc::Extra::Checking::Checks::CSS.create(site) check.run # Check assert check.issues.empty? end @@ -26,11 +24,11 @@ FileUtils.mkdir_p('output') File.open('output/blah.html', 'w') { |io| io.write('<h1>Hi!</h1>') } File.open('output/style.css', 'w') { |io| io.write('h1 { coxlor: rxed; }') } # Run check - check = Nanoc::Extra::Checking::Checks::CSS.new(site) + check = Nanoc::Extra::Checking::Checks::CSS.create(site) check.run # Check refute check.issues.empty? assert_equal 1, check.issues.size @@ -47,10 +45,10 @@ FileUtils.mkdir_p('output') File.open('output/blah.html', 'w') { |io| io.write('<h1>Hi!</h1>') } File.open('output/style.css', 'w') { |io| io.write('h1 { ; {') } # Run check - check = Nanoc::Extra::Checking::Checks::CSS.new(site) + check = Nanoc::Extra::Checking::Checks::CSS.create(site) check.run # Check refute check.issues.empty? assert_equal 1, check.issues.size