Sha256: 0cbe8b4058ff202cb141db3ac6c7fe70c362f5b60c44ce17c047646229f87033

Contents?: true

Size: 469 Bytes

Versions: 21

Compression:

Stored size: 469 Bytes

Contents

require 'tc_helper.rb'

class TestStrVal < Test::Unit::TestCase

  def setup
    @str_val = Axlsx::StrVal.new :v => "1"
  end

  def test_initialize
    assert_equal(@str_val.v, "1")
  end

  def test_to_xml_string
    str = '<?xml version="1.0" encoding="UTF-8"?>'
    str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '">'
    str << @str_val.to_xml_string(0)
    doc = Nokogiri::XML(str)
    assert_equal(doc.xpath("//c:pt/c:v[text()='1']").size, 1)
  end

end

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
caxlsx-2.0.2 test/drawing/tc_str_val.rb
dg-axlsx-2.1.0 test/drawing/tc_str_val.rb
axlsx-2.1.0.pre test/drawing/tc_str_val.rb
l_axlsx-2.0.1 test/drawing/tc_str_val.rb
axlsx-2.0.1 test/drawing/tc_str_val.rb
axlsx-2.0.0 test/drawing/tc_str_val.rb
axlsx-1.3.6 test/drawing/tc_str_val.rb
axlsx-1.3.5 test/drawing/tc_str_val.rb
axlsx-1.3.4 test/drawing/tc_str_val.rb
axlsx-1.3.3 test/drawing/tc_str_val.rb
axlsx-1.3.2 test/drawing/tc_str_val.rb
axlsx-1.3.1 test/drawing/tc_str_val.rb
axlsx-1.2.3 test/drawing/tc_str_val.rb
axlsx-1.2.2 test/drawing/tc_str_val.rb
axlsx-1.2.1 test/drawing/tc_str_val.rb
axlsx-1.2.0 test/drawing/tc_str_val.rb
axlsx-1.1.8 test/drawing/tc_str_val.rb
axlsx-1.1.7 test/drawing/tc_str_val.rb
axlsx-1.1.6 test/drawing/tc_str_val.rb
axlsx-1.1.5 test/drawing/tc_str_val.rb