Sha256: 39ffb2df4c9870e229ec664d4a8e9e1f9bf163cec85fe7ff37fd5f5ba76afb62

Contents?: true

Size: 654 Bytes

Versions: 16

Compression:

Stored size: 654 Bytes

Contents

 require 'tc_helper.rb'

 class TestNumDataSource < Test::Unit::TestCase

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

  def test_tag_name
    assert_raise(ArgumentError) { @data_source.tag_name = :zVal }
    assert_nothing_raised { @data_source.tag_name = :yVal }
    assert_nothing_raised { @data_source.tag_name = :bubbleSize }
  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

Version data entries

16 entries across 16 versions & 6 rubygems

Version Path
caxlsx-3.1.1 test/drawing/tc_data_source.rb
caxlsx-3.1.0 test/drawing/tc_data_source.rb
bonio-axlsx-2.2.3 test/drawing/tc_data_source.rb
caxlsx-3.0.4 test/drawing/tc_data_source.rb
caxlsx-3.0.3 test/drawing/tc_data_source.rb
caxlsx-3.0.2 test/drawing/tc_data_source.rb
caxlsx-3.0.1 test/drawing/tc_data_source.rb
caxlsx-3.0.0 test/drawing/tc_data_source.rb
axlsx-alt-3.0.1 test/drawing/tc_data_source.rb
axlsx-alt-3.0.0 test/drawing/tc_data_source.rb
axlsx-3.0.0.pre test/drawing/tc_data_source.rb
bonio-axlsx-2.2.2 test/drawing/tc_data_source.rb
bonio-axlsx-2.2.1 test/drawing/tc_data_source.rb
dg-axlsx-2.1.0 test/drawing/tc_data_source.rb
axlsx-2.1.0.pre test/drawing/tc_data_source.rb
l_axlsx-2.0.1 test/drawing/tc_data_source.rb