Sha256: f40799a25075212dc00115e642358e996e7e61980d7561e00d32bcd8041aebca

Contents?: true

Size: 524 Bytes

Versions: 22

Compression:

Stored size: 524 Bytes

Contents

require File.expand_path(::File.dirname(__FILE__) + '/../lib/xml/smart')
require File.expand_path(::File.dirname(__FILE__) + '/smartrunner.rb')

class TestBasic < Minitest::Test
  def test_root
    doc = XML::Smart.open(::File.dirname(__FILE__) + "/EXAMPLE.xml")

    node = doc.find("test")
    assert(node.length == 1)

    node = doc.root.find("test")
    assert(node.length == 0)

    node = doc.root.find("/test")
    assert(node.length == 1)

    node = node.first.find("names")
    assert(node.length == 1)
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
xml-smart-0.5.3 test/tc_root.rb
xml-smart-0.5.2 test/tc_root.rb
xml-smart-0.5.1 test/tc_root.rb
xml-smart-0.5.0 test/tc_root.rb
xml-smart-0.4.4 test/tc_root.rb
xml-smart-0.4.3 test/tc_root.rb
xml-smart-0.4.2 test/tc_root.rb
xml-smart-0.4.1 test/tc_root.rb
xml-smart-0.4.0 test/tc_root.rb
xml-smart-0.3.22 test/tc_root.rb
xml-smart-0.3.21 test/tc_root.rb
xml-smart-0.3.20 test/tc_root.rb
xml-smart-0.3.19 test/tc_root.rb
xml-smart-0.3.18 test/tc_root.rb
xml-smart-0.3.17 test/tc_root.rb
xml-smart-0.3.16 test/tc_root.rb
xml-smart-0.3.15 test/tc_root.rb
xml-smart-0.3.14 test/tc_root.rb
xml-smart-0.3.12 test/tc_root.rb
xml-smart-0.3.11 test/tc_root.rb