# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx/shape' require 'write_xlsx/drawing' class DrawingShape03 < Minitest::Test def test_drawing_shape_03 shape = Writexlsx::Shape.new # Set shape properties via []= method shape.id = 1000 shape.start = 1001 shape.start_index = 1 shape.end = 1002 shape.end_index = 4 @obj = Writexlsx::Drawings.new @obj.embedded = 1 dimensions = [ 4, 8, 209550, 95250, 12, 22, 209660, 96260, 10000, 20000 ] drawing = Writexlsx::Drawing.new( 3, dimensions, 95250, 190500, '', shape, 1 ) @obj.add_drawing_object(drawing) @obj.__send__('write_nv_cxn_sp_pr', 1, shape) result = got_to_array(@obj.xml_str) expected = expected_to_array(< EOS ) assert_equal(expected, result) end end