test/base/test_site.rb in nanoc-4.0.0b1 vs test/base/test_site.rb in nanoc-4.0.0b2
- old
+ new
@@ -151,12 +151,12 @@
# Create site
site = Nanoc::Int::Site.new('.')
site.load
# Check
- assert_equal 1, site.data_sources.size
- assert_equal Nanoc::Identifier.new('/foo/'), site.items[0].identifier
+ assert_equal 1, site.data_sources.size
+ refute_nil site.items['/foo/']
end
end
def test_identifier_classes
Nanoc::CLI.run %w( create_site bar)
@@ -183,11 +183,11 @@
Nanoc::CLI.run %w( create_site bar)
FileUtils.cd('bar') do
FileUtils.mkdir_p('content/parent')
FileUtils.mkdir_p('content/parent/bar')
- data = File.read('nanoc.yaml').sub('identifier_style: full', 'identifier_style: stripped')
+ data = File.read('nanoc.yaml').sub('identifier_type: full', 'identifier_type: legacy')
File.open('nanoc.yaml', 'w') { |io| io << data }
File.open('content/parent.md', 'w') { |io| io << 'asdf' }
File.open('content/parent/foo.md', 'w') { |io| io << 'asdf' }
File.open('content/parent/bar.md', 'w') { |io| io << 'asdf' }
@@ -201,11 +201,11 @@
foo = site.items.find { |i| i.identifier == '/parent/foo/' }
bar = site.items.find { |i| i.identifier == '/parent/bar/' }
qux = site.items.find { |i| i.identifier == '/parent/bar/qux/' }
assert_equal Set.new([parent, style]), Set.new(root.children)
- assert_equal Set.new([foo, bar]), Set.new(parent.children)
- assert_equal Set.new([qux]), Set.new(bar.children)
+ assert_equal Set.new([foo, bar]), Set.new(parent.children)
+ assert_equal Set.new([qux]), Set.new(bar.children)
assert_equal nil, root.parent
assert_equal root, parent.parent
assert_equal parent, foo.parent
assert_equal parent, bar.parent