Sha256: 264bd6bd104768b19932d34adb7128190ea25f6036cb196a1f7c326fef86eba3

Contents?: true

Size: 607 Bytes

Versions: 6

Compression:

Stored size: 607 Bytes

Contents

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

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

      def test_type
        assert_equal(Node::PI_NODE, @xml.children[0].type)
      end

      def test_name
        assert_equal 'TEST-STYLE', @xml.children[0].name
      end

      def test_new
        assert ref = ProcessingInstruction.new(@xml, 'name', 'content')
        assert_instance_of ProcessingInstruction, ref
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nokogiri-1.2.0-java test/xml/test_processing_instruction.rb
nokogiri-1.2.0-x86-mswin32-60 test/xml/test_processing_instruction.rb
nokogiri-1.2.0 test/xml/test_processing_instruction.rb
nokogiri-1.2.1-java test/xml/test_processing_instruction.rb
nokogiri-1.2.1-x86-mswin32-60 test/xml/test_processing_instruction.rb
nokogiri-1.2.1 test/xml/test_processing_instruction.rb