test/checking/checks/test_external_links.rb in nanoc-4.8.9 vs test/checking/checks/test_external_links.rb in nanoc-4.8.10

- old
+ new

@@ -63,27 +63,25 @@ end end def test_excluded with_site do |site| - # Create check - check = Nanoc::Checking::Checks::ExternalLinks.create(site) site.config.update(checks: { external_links: { exclude: ['^http://excluded.com$'] } }) - # Test + check = Nanoc::Checking::Checks::ExternalLinks.create(site) + assert check.send(:excluded?, 'http://excluded.com') refute check.send(:excluded?, 'http://excluded.com/notexcluded') refute check.send(:excluded?, 'http://notexcluded.com') end end def test_excluded_file with_site do |site| - # Create check - check = Nanoc::Checking::Checks::ExternalLinks.create(site) site.config.update(checks: { external_links: { exclude_files: ['blog/page'] } }) - # Test + check = Nanoc::Checking::Checks::ExternalLinks.create(site) + assert check.send(:excluded_file?, 'output/blog/page1/index.html') refute check.send(:excluded_file?, 'output/blog/pag1/index.html') end end end