From 46c2ff10319cf068c15052ab2a320b974699e6e9 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 27 Mar 2021 01:15:54 +0100 Subject: Fix test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The styles need to actually exist, otherwise the test fails with “ArgumentError: Invalid cellXfs id”. --- test/workbook/worksheet/tc_row.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index e6dc3ef1..38b13806 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -149,7 +149,7 @@ class TestRow < Test::Unit::TestCase def test_offsets_with_styles offset = 3 values = [1,2,3,4,5] - styles = [6,7,8,9,10] + styles = (1..5).map{ @ws.workbook.styles.add_style } r = @ws.add_row(values, offset: offset, style: styles) r.cells.each_with_index do |c, index| assert_equal(c.style, index < offset ? 0 : styles[index-offset]) -- cgit v1.2.3