Sha256: 9480522acd5f859d14caa9a0ffa297488e13ae9a2ad0c1b643da7af3ed365490

Contents?: true

Size: 1017 Bytes

Versions: 42

Compression:

Stored size: 1017 Bytes

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx/workbook'
require 'write_xlsx/package/vml'

class TestWritePath < Test::Unit::TestCase
  def test_write_path
    vml = Writexlsx::Package::Vml.new
    vml.__send__('write_comment_path', 't', 'rect')
    result = vml.instance_variable_get(:@writer).string
    expected = '<v:path gradientshapeok="t" o:connecttype="rect"/>'
    assert_equal(expected, result)
  end

  def test_write_path_without_gradientshapeok
    vml = Writexlsx::Package::Vml.new
    vml.__send__('write_comment_path', nil, 'none')
    result = vml.instance_variable_get(:@writer).string
    expected = '<v:path o:connecttype="none"/>'
    assert_equal(expected, result)
  end

  def test_write_button_path
    vml = Writexlsx::Package::Vml.new
    vml.__send__('write_button_path')
    result = vml.instance_variable_get(:@writer).string
    expected = '<v:path shadowok="f" o:extrusionok="f" strokeok="f" fillok="f" o:connecttype="rect"/>'
    assert_equal(expected, result)
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
write_xlsx-0.86.0 test/package/vml/test_write_path.rb
write_xlsx-0.85.11 test/package/vml/test_write_path.rb
write_xlsx-0.85.10 test/package/vml/test_write_path.rb
write_xlsx-0.85.9 test/package/vml/test_write_path.rb
write_xlsx-0.85.8 test/package/vml/test_write_path.rb
write_xlsx-0.85.7 test/package/vml/test_write_path.rb
write_xlsx-0.85.6 test/package/vml/test_write_path.rb
write_xlsx-0.85.5 test/package/vml/test_write_path.rb
write_xlsx-0.85.4 test/package/vml/test_write_path.rb
write_xlsx-0.85.3 test/package/vml/test_write_path.rb
write_xlsx-0.85.2 test/package/vml/test_write_path.rb
write_xlsx-0.85.1 test/package/vml/test_write_path.rb
write_xlsx-0.83.0 test/package/vml/test_write_path.rb
write_xlsx-0.81.1 test/package/vml/test_write_path.rb
write_xlsx-0.81.0 test/package/vml/test_write_path.rb
write_xlsx-0.80.0 test/package/vml/test_write_path.rb
write_xlsx-0.79.0 test/package/vml/test_write_path.rb
write_xlsx-0.78.0 test/package/vml/test_write_path.rb
write_xlsx-0.77.2 test/package/vml/test_write_path.rb
write_xlsx-0.77.1 test/package/vml/test_write_path.rb