Sha256: 5f7e730f0dc80b6214f0cd01d8e5b3ae5eb89d2a4fc22dfb0eb9d8afd2940fcc

Contents?: true

Size: 454 Bytes

Versions: 3

Compression:

Stored size: 454 Bytes

Contents

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

module Nokogiri
  module XML
    class TestAttr < Nokogiri::TestCase
      def test_unlink
        xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE)
        address = xml.xpath('/staff/employee/address').first
        assert_equal 'Yes', address['domestic']
        address.attribute_nodes.first.unlink
        assert_nil address['domestic']
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nokogiri-1.1.1-java test/xml/test_attr.rb
nokogiri-1.1.1-x86-mswin32-60 test/xml/test_attr.rb
nokogiri-1.1.1 test/xml/test_attr.rb