# File test/test_node.rb, line 42 def test_namespace() foaf = Namespace.new("http://xmlns.com/foaf/0.1/") assert(foaf.resource?) assert_equal(foaf,Node.new(:uri_string=>"http://xmlns.com/foaf/0.1/")) nameinst = foaf['name'] assert_equal(nameinst,Node.new(:uri_string=>"http://xmlns.com/foaf/0.1/name")) assert_same(nameinst,foaf['name']) assert_equal(foaf['mbox'],Node.new(:uri_string=>"http://xmlns.com/foaf/0.1/mbox")) end