summaryrefslogtreecommitdiffhomepage
path: root/test/drawing/tc_data_source.rb
blob: 6b35e008c49cbc38f05bad61f47d21fcc9bfd5bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 require 'tc_helper.rb'

 class TestNumDataSource < Test::Unit::TestCase

  def setup
    @data_source = Axlsx::NumDataSource.new :data => ["1", "2", "3"]
  end

  def test_to_xml_string_strLit
    str = '<?xml version="1.0" encoding="UTF-8"?>'
    str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '">'
    str << @data_source.to_xml_string
    doc = Nokogiri::XML(str)
    assert_equal(doc.xpath("//c:val").size, 1)
  end

 end