Sha256: 6bceb5bc821ead13183a3b86a883a4a49519168ed67440b7ab17870178b9ec6a

Contents?: true

Size: 713 Bytes

Versions: 22

Compression:

Stored size: 713 Bytes

Contents

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

class TestXinclude < Minitest::Test
  def test_xinclude
    nums = 10000

    # Watch the power
    Minitest::PerformanceReporter::start_timing "#xinclude! (#{nums} times)"
    nums.times do
      doc = XML::Smart.open_unprotected(::File.dirname(__FILE__) + "/HELLO.xml")
      doc.xinclude!
    end 
    Minitest::PerformanceReporter::end_timing

    doc = XML::Smart.open(::File.dirname(__FILE__) + "/HELLO.xml")
    doc.xinclude!

    stuff = doc.find('/hellos/*')
    assert(stuff[4].text == "hello me")
    assert(stuff[5].text == "hello curucamp")
  end  
end  

Version data entries

22 entries across 22 versions & 1 rubygems

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