test/validations_test.rb in fast_excel-0.4.1 vs test/validations_test.rb in fast_excel-0.5.0
- old
+ new
@@ -9,11 +9,11 @@
error = assert_raises do
workbook.add_worksheet("Payments Report")
end
assert_equal(ArgumentError, error.class)
- assert_equal("Invalid worksheet name 'Payments Report': (16 - error_sheetname_already_used) Worksheet name is already in use.", error.message)
+ assert_equal("Invalid worksheet name 'Payments Report': (17 - error_sheetname_already_used) Worksheet name is already in use.", error.message)
end
it "should not raise error when worksheet name is null" do
workbook = FastExcel.open(constant_memory: true)
@@ -31,11 +31,11 @@
error = assert_raises do
workbook.add_worksheet("ABCDEFGHIJKLMNOPQRSTUVWXYZ012345")
end
assert_equal(ArgumentError, error.class)
- assert_equal("Invalid worksheet name 'ABCDEFGHIJKLMNOPQRSTUVWXYZ012345': (13 - error_sheetname_length_exceeded) Worksheet name exceeds Excel's limit of 31 characters.", error.message)
+ assert_equal("Invalid worksheet name 'ABCDEFGHIJKLMNOPQRSTUVWXYZ012345': (14 - error_sheetname_length_exceeded) Worksheet name exceeds Excel's limit of 31 characters.", error.message)
end
it "should not raise error when the sheet name is at maximum length" do
workbook = FastExcel.open(constant_memory: true)
@@ -51,8 +51,8 @@
worksheet = workbook.add_worksheet('a?')
worksheet.write_value(1, 1, 'a') # without the validation, this method will crash the process
end
assert_equal(ArgumentError, error.class)
- assert_equal("Invalid worksheet name 'a?': (14 - error_invalid_sheetname_character) Worksheet name cannot contain invalid characters: '[ ] : * ? / \\'", error.message)
+ assert_equal("Invalid worksheet name 'a?': (15 - error_invalid_sheetname_character) Worksheet name cannot contain invalid characters: '[ ] : * ? / \\'", error.message)
end
end