test/test_04_dimensions.rb in writeexcel-0.6.6 vs test/test_04_dimensions.rb in writeexcel-0.6.7
- old
+ new
@@ -27,11 +27,11 @@
def teardown
@workbook.close
end
def test_no_worksheet_cell_data
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -41,11 +41,11 @@
assert_equal(expected, results)
end
def test_data_in_cell_0_0
@worksheet.write(0, 0, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -55,11 +55,11 @@
assert_equal(expected, results)
end
def test_data_in_cell_0_255
@worksheet.write(0, 255, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -69,11 +69,11 @@
assert_equal(expected, results)
end
def test_data_in_cell_65535_0
@worksheet.write(65535, 0, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -83,11 +83,11 @@
assert_equal(expected, results)
end
def test_data_in_cell_65535_255
@worksheet.write(65535, 255, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -97,11 +97,11 @@
assert_equal(expected, results)
end
def test_set_row_for_row_4
@worksheet.set_row(4, 20)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -113,11 +113,11 @@
def test_set_row_for_row_4_to_6
@worksheet.set_row(4, 20)
@worksheet.set_row(5, 20)
@worksheet.set_row(6, 20)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -127,11 +127,11 @@
assert_equal(expected, results)
end
def test_set_column_for_row_4
@worksheet.set_column(4, 4, 20)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -142,11 +142,11 @@
end
def test_data_in_cell_0_0_and_set_row_for_row_4
@worksheet.write(0, 0, 'Test')
@worksheet.set_row(4, 20)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -157,11 +157,11 @@
end
def test_data_in_cell_0_0_and_set_row_for_row_4_reverse_order
@worksheet.set_row(4, 20)
@worksheet.write(0, 0, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -172,11 +172,11 @@
end
def test_data_in_cell_5_3_and_set_row_for_row_4
@worksheet.write(5, 3, 'Test')
@worksheet.set_row(4, 20)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -186,11 +186,11 @@
assert_equal(expected, results)
end
def test_comment_in_cell_5_3
@worksheet.write_comment(5, 3, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -200,11 +200,11 @@
assert_equal(expected, results)
end
def test_nil_value_for_row
error = @worksheet.write_string(nil, 1, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -216,11 +216,11 @@
end
def test_data_in_cell_5_3_and_10_1
@worksheet.write( 5, 3, 'Test')
@worksheet.write(10, 1, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -231,11 +231,11 @@
end
def test_data_in_cell_5_3_and_10_5
@worksheet.write( 5, 3, 'Test')
@worksheet.write(10, 5, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -245,11 +245,11 @@
assert_equal(expected, results)
end
def test_write_string
@worksheet.write_string(5, 3, 'Test')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -259,11 +259,11 @@
assert_equal(expected, results)
end
def test_write_number
@worksheet.write_number(5, 3, 5)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -273,11 +273,11 @@
assert_equal(expected, results)
end
def test_write_url
@worksheet.write_url(5, 3, 'http://www.ruby.com')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -287,11 +287,11 @@
assert_equal(expected, results)
end
def test_write_formula
@worksheet.write_formula(5, 3, ' 1 + 2')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -301,11 +301,11 @@
assert_equal(expected, results)
end
def test_write_blank
@worksheet.write_string(5, 3, @format)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -315,11 +315,11 @@
assert_equal(expected, results)
end
def test_write_blank_no_format
@worksheet.write_string(5, 3)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -329,11 +329,11 @@
assert_equal(expected, results)
end
def test_write_utf16be_string
@worksheet.write_utf16be_string(5, 3, @smiley)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -343,11 +343,11 @@
assert_equal(expected, results)
end
def test_write_utf16le_string
@worksheet.write_utf16le_string(5, 3, @smiley)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -356,14 +356,14 @@
assert_equal(expected, results)
end
def test_repeat_formula
- formula = @worksheet.store_formula('=A1 * 3 + 50')
+ formula = @worksheet.__send__("store_formula", '=A1 * 3 + 50')
@worksheet.repeat_formula(5, 3, formula, @format, 'A1', 'A2')
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]
@@ -372,13 +372,13 @@
assert_equal(expected, results)
end
def test_merge_range
- formula = @worksheet.store_formula('=A1 * 3 + 50')
+ formula = @worksheet.__send__("store_formula", '=A1 * 3 + 50')
@worksheet.merge_range('C6:E8', 'Test', @format)
- data = @worksheet.store_dimensions
+ data = @worksheet.__send__("store_dimensions")
vals = data.unpack('x4 VVvv')
alist = @dims.zip(vals)
results = Hash[*alist.flatten]