File: test_additional_namespaces_in_builder_doc.rb

package info (click to toggle)
ruby-nokogiri 1.6.3.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,132 kB
  • ctags: 2,605
  • sloc: xml: 26,397; ruby: 14,634; ansic: 4,855; yacc: 244; sh: 122; makefile: 11
file content (14 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "helper"

module Nokogiri
  module XML
    class TestAdditionalNamespacesInBuilderDoc < Nokogiri::TestCase
      def test_builder_namespaced_root_node_ns
        b = Nokogiri::XML::Builder.new do |x|
          x[:foo].RDF(:'xmlns:foo' => 'http://foo.io')
        end
        assert_equal 'http://foo.io', b.doc.root.namespace.href
      end
    end
  end
end