Sha256: c2c403ae7a64141757b33460dc07c3ff455eb279ad4165236fbef456b1f09760

Contents?: true

Size: 465 Bytes

Versions: 20

Compression:

Stored size: 465 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', "helper"))

module Nokogiri
  module XML
    class TestCDATA < Nokogiri::TestCase
      def setup
        @xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE)
      end

      def test_cdata_node
        name = @xml.xpath('//employee[2]/name').first
        assert cdata = name.children[1]
        assert cdata.cdata?
        assert_equal 'cdata-section', cdata.name
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
tenderlove-nokogiri-0.0.0-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.0.0 test/xml/test_cdata.rb
nokogiri-1.0.0-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.0.1 test/xml/test_cdata.rb
nokogiri-1.0.4 test/xml/test_cdata.rb
nokogiri-1.0.5-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.0.4-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.0.2 test/xml/test_cdata.rb
nokogiri-1.0.3 test/xml/test_cdata.rb
nokogiri-1.0.3-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.0.5 test/xml/test_cdata.rb
nokogiri-1.0.6 test/xml/test_cdata.rb
nokogiri-1.0.6-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.1.0 test/xml/test_cdata.rb
nokogiri-1.0.7 test/xml/test_cdata.rb
nokogiri-1.0.7-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.1.1-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.1.1-java test/xml/test_cdata.rb
nokogiri-1.1.0-x86-mswin32-60 test/xml/test_cdata.rb
nokogiri-1.1.1 test/xml/test_cdata.rb