Sha256: 14e104c956580561fbd74602e908b538bbe94a55f687a0ae3c69438f72aa0ec3
Contents?: true
Size: 512 Bytes
Versions: 17
Compression:
Stored size: 512 Bytes
Contents
require "xml" require 'test/unit' class TestNS < Test::Unit::TestCase def test_ns node = XML::Node.new('foo') ns = XML::NS.new(node, 'http://www.mynamespace.com', 'my_namepace') assert_equal(ns.prefix, 'my_namepace') assert_equal(ns.href, 'http://www.mynamespace.com') end def test_default_ns node = XML::Node.new('foo') ns = XML::NS.new(node, 'http://www.mynamespace.com', nil) assert_equal(ns.prefix, nil) assert_equal(ns.href, 'http://www.mynamespace.com') end end
Version data entries
17 entries across 17 versions & 5 rubygems