From e7a2916e33db7582ae8da307692cab6bd21b6bab Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 30 Sep 2012 18:29:48 +0900 Subject: Forgot to add these files to last commit! extraction refactoring --- test/workbook/tc_defined_name.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/workbook/tc_defined_name.rb b/test/workbook/tc_defined_name.rb index 51f5a484..b16b3346 100644 --- a/test/workbook/tc_defined_name.rb +++ b/test/workbook/tc_defined_name.rb @@ -10,14 +10,14 @@ class TestDefinedNames < Test::Unit::TestCase end def test_string_attributes - Axlsx::DefinedName::STRING_ATTRIBUTES.each do |attr| + %w(short_cut_key status_bar help description custom_menu comment).each do |attr| assert_raise(ArgumentError, 'only strings allowed in string attributes') { @dn.send("#{attr}=", 1) } assert_nothing_raised { @dn.send("#{attr}=", '_xlnm.Sheet_Title') } end end def test_boolean_attributes - Axlsx::DefinedName::BOOLEAN_ATTRIBUTES.each do |attr| + %w(workbook_parameter publish_to_server xlm vb_proceedure function hidden).each do |attr| assert_raise(ArgumentError, 'only booleanish allowed in string attributes') { @dn.send("#{attr}=", 'foo') } assert_nothing_raised { @dn.send("#{attr}=", 1) } end -- cgit v1.2.3