test/checking/checks/test_external_links.rb in nanoc-4.4.5 vs test/checking/checks/test_external_links.rb in nanoc-4.4.6
- old
+ new
@@ -1,5 +1,7 @@
+require 'helper'
+
class Nanoc::Checking::Checks::ExternalLinksTest < Nanoc::TestCase
def test_run
with_site do |site|
# Create files
FileUtils.mkdir_p('output')
@@ -75,11 +77,11 @@
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$'] } } })
+ site.config.update(checks: { external_links: { exclude: ['^http://excluded.com$'] } })
# Test
assert check.send(:excluded?, 'http://excluded.com')
refute check.send(:excluded?, 'http://excluded.com/notexcluded')
refute check.send(:excluded?, 'http://notexcluded.com')
@@ -88,10 +90,10 @@
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'] } } })
+ site.config.update(checks: { external_links: { exclude_files: ['blog/page'] } })
# Test
assert check.send(:excluded_file?, 'output/blog/page1/index.html')
refute check.send(:excluded_file?, 'output/blog/pag1/index.html')
end