Sha256: ba392f330a02cedc6eed477aa48726a995a85cbc203cd6f25135be1807bb16ba

Contents?: true

Size: 732 Bytes

Versions: 447

Compression:

Stored size: 732 Bytes

Contents

require "helper"

module Nokogiri
  module XML
    class TestProcessingInstruction < Nokogiri::TestCase
      def setup
        super
        @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

      def test_many_new
        100.times { ProcessingInstruction.new(@xml, 'foo', 'bar') }
        @xml.root << ProcessingInstruction.new(@xml, 'foo', 'bar')
      end
    end
  end
end

Version data entries

447 entries across 437 versions & 42 rubygems

Version Path
nokogiri-1.7.1-x64-mingw32 test/xml/test_processing_instruction.rb
nokogiri-1.7.1-java test/xml/test_processing_instruction.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/xml/test_processing_instruction.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/xml/test_processing_instruction.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/xml/test_processing_instruction.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/xml/test_processing_instruction.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/xml/test_processing_instruction.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/xml/test_processing_instruction.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/xml/test_processing_instruction.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/nokogiri-1.6.8.1/test/xml/test_processing_instruction.rb
abaci-0.3.0 vendor/bundle/gems/nokogiri-1.6.8/test/xml/test_processing_instruction.rb
nokogiri-1.7.0.1 test/xml/test_processing_instruction.rb
nokogiri-1.7.0.1-x86-mingw32 test/xml/test_processing_instruction.rb
nokogiri-1.7.0.1-x64-mingw32 test/xml/test_processing_instruction.rb
nokogiri-1.7.0.1-java test/xml/test_processing_instruction.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/nokogiri-1.7.0-java/test/xml/test_processing_instruction.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/nokogiri-1.7.0-java/test/xml/test_processing_instruction.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/nokogiri-1.7.0-java/test/xml/test_processing_instruction.rb
nokogiri-1.7.0 test/xml/test_processing_instruction.rb
nokogiri-1.7.0-x86-mingw32 test/xml/test_processing_instruction.rb