test/webgen/test_tree.rb in webgen-1.0.0.beta2 vs test/webgen/test_tree.rb in webgen-1.0.0.beta3

- old
+ new

@@ -97,13 +97,13 @@ assert_equal(1, nrcalls) end def test_register_node node = Webgen::Node.new(@tree.dummy_root, '/', '/') - assert_equal(node, @tree['/', :alcn]) - assert_equal(node, @tree['/', :acn]) - assert_equal(node, @tree['/', :dest_path]) + assert_equal(node, @tree.node('/', :alcn)) + assert_equal(node, @tree.node('/', :acn)) + assert_equal(node, @tree.node('/', :dest_path)) other_node = Webgen::Node.new(node, 'dummy.html', '/', 'no_output' => true) assert_equal('/', other_node.dest_path) assert_raises(RuntimeError) { Webgen::Node.new(@tree.dummy_root, '/', 'dummy') } @@ -124,22 +124,22 @@ assert_nil(@tree.delete_node('/unknown_path')) @tree.delete_node(file) assert_nil(@tree['/testfile']) - assert_nil(@tree['/testfile', :acn]) - assert_nil(@tree['/testfile', :dest_path]) + assert_nil(@tree.node('/testfile', :acn)) + assert_nil(@tree.node('/testfile', :dest_path)) assert_equal(0, @tree.node_access[:translation_key]['/testfile'].length) assert_equal(2, root.children.size) assert_equal(1, nrcalls) @tree.delete_node(virtual_root) - assert_equal(root, @tree['/', :dest_path]) + assert_equal(root, @tree.node('/', :dest_path)) @tree.delete_node(root) assert_nil(@tree['/testdir']) - assert_nil(@tree['/testdir', :acn]) - assert_nil(@tree['/testdir', :dest_path]) + assert_nil(@tree.node('/testdir', :acn)) + assert_nil(@tree.node('/testdir', :dest_path)) assert_nil(@tree['/']) assert_equal(4, nrcalls) assert_equal([@tree.dummy_root], @tree.node_access[:alcn].values) end