Sha256: 5c00bf2c0999b4558146600a2e248418c8c1b93f9564c292e56d81f5f9113fbd

Contents?: true

Size: 754 Bytes

Versions: 36

Compression:

Stored size: 754 Bytes

Contents

require 'tc_helper.rb'

class TestCfvo < Test::Unit::TestCase
  def setup
    @cfvo = Axlsx::Cfvo.new(:val => "0", :type => :min)
  end

  def test_val
    assert_nothing_raised { @cfvo.val = "abc" }
    assert_equal(@cfvo.val, "abc")
  end

  def test_type
    assert_raise(ArgumentError) { @cfvo.type = :invalid_type }
    assert_nothing_raised { @cfvo.type = :max }
    assert_equal(@cfvo.type, :max)
  end

  def test_gte
    assert_raise(ArgumentError) { @cfvo.gte = :bob }
    assert_equal(@cfvo.gte, true)
    assert_nothing_raised { @cfvo.gte = false }
    assert_equal(@cfvo.gte, false)
  end

  def test_to_xml_string
    doc = Nokogiri::XML.parse(@cfvo.to_xml_string)
    assert doc.xpath(".//cfvo[@type='min'][@val=0][@gte=true]")
  end

end

Version data entries

36 entries across 36 versions & 6 rubygems

Version Path
caxlsx-3.1.1 test/workbook/worksheet/tc_cfvo.rb
caxlsx-3.1.0 test/workbook/worksheet/tc_cfvo.rb
bonio-axlsx-2.2.3 test/workbook/worksheet/tc_cfvo.rb
caxlsx-3.0.4 test/workbook/worksheet/tc_cfvo.rb
caxlsx-3.0.3 test/workbook/worksheet/tc_cfvo.rb
caxlsx-3.0.2 test/workbook/worksheet/tc_cfvo.rb
caxlsx-2.0.2 test/workbook/worksheet/tc_cfvo.rb
caxlsx-3.0.1 test/workbook/worksheet/tc_cfvo.rb
caxlsx-3.0.0 test/workbook/worksheet/tc_cfvo.rb
axlsx-alt-3.0.1 test/workbook/worksheet/tc_cfvo.rb
axlsx-alt-3.0.0 test/workbook/worksheet/tc_cfvo.rb
axlsx-3.0.0.pre test/workbook/worksheet/tc_cfvo.rb
bonio-axlsx-2.2.2 test/workbook/worksheet/tc_cfvo.rb
bonio-axlsx-2.2.1 test/workbook/worksheet/tc_cfvo.rb
dg-axlsx-2.1.0 test/workbook/worksheet/tc_cfvo.rb
axlsx-2.1.0.pre test/workbook/worksheet/tc_cfvo.rb
l_axlsx-2.0.1 test/workbook/worksheet/tc_cfvo.rb
axlsx-2.0.1 test/workbook/worksheet/tc_cfvo.rb
axlsx-2.0.0 test/workbook/worksheet/tc_cfvo.rb
axlsx-1.3.6 test/workbook/worksheet/tc_cfvo.rb