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.77.0 test/package/vml/test_write_path.rb
write_xlsx-0.76.3 test/package/vml/test_write_path.rb
write_xlsx-0.76.2 test/package/vml/test_write_path.rb
write_xlsx-0.76.1 test/package/vml/test_write_path.rb
write_xlsx-0.76.0 test/package/vml/test_write_path.rb
write_xlsx-0.75.0 test/package/vml/test_write_path.rb
write_xlsx-0.74.0 test/package/vml/test_write_path.rb
write_xlsx-0.73.0 test/package/vml/test_write_path.rb
write_xlsx-0.72.3.beta1 test/package/vml/test_write_path.rb
write_xlsx-0.72.2 test/package/vml/test_write_path.rb
write_xlsx-0.72.1 test/package/vml/test_write_path.rb
write_xlsx-0.72.0 test/package/vml/test_write_path.rb
write_xlsx-0.71.0 test/package/vml/test_write_path.rb
write_xlsx-0.70.0 test/package/vml/test_write_path.rb
write_xlsx-0.69.0 test/package/vml/test_write_path.rb
write_xlsx-0.65.1 test/package/vml/test_write_path.rb
write_xlsx-0.65.0 test/package/vml/test_write_path.rb
write_xlsx-0.64.1 test/package/vml/test_write_path.rb
write_xlsx-0.64.0 test/package/vml/test_write_path.rb
write_xlsx-0.62.0 test/package/vml/test_write_path.rb