summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-10 11:45:57 +0200
committerGeremia Taglialatela <[email protected]>2023-04-10 11:45:57 +0200
commit84a2b255d6fd780f526ac3d9bf99a40f08792986 (patch)
treecea31975973b14e6a7e2879bd43a561ad0bfa59d /test
parent1406b47e64188765f220be86001ec1f543e0157d (diff)
downloadcaxlsx-84a2b255d6fd780f526ac3d9bf99a40f08792986.tar.gz
caxlsx-84a2b255d6fd780f526ac3d9bf99a40f08792986.zip
Fix Layout/LeadingCommentSpace offenses
``` rubocop --only Layout/LeadingCommentSpace -a ```
Diffstat (limited to 'test')
-rw-r--r--test/content_type/tc_content_type.rb4
-rw-r--r--test/drawing/tc_pic.rb4
-rw-r--r--test/drawing/tc_pie_series.rb2
-rw-r--r--test/profile.rb2
-rw-r--r--test/stylesheet/tc_styles.rb2
-rw-r--r--test/tc_package.rb8
-rw-r--r--test/util/tc_simple_typed_list.rb4
-rw-r--r--test/util/tc_validators.rb48
-rw-r--r--test/workbook/tc_workbook.rb2
-rw-r--r--test/workbook/worksheet/tc_cell.rb2
-rw-r--r--test/workbook/worksheet/tc_col.rb2
-rw-r--r--test/workbook/worksheet/tc_conditional_formatting.rb2
-rw-r--r--test/workbook/worksheet/tc_data_validation.rb20
-rw-r--r--test/workbook/worksheet/tc_pane.rb2
-rw-r--r--test/workbook/worksheet/tc_sheet_protection.rb2
-rw-r--r--test/workbook/worksheet/tc_sheet_view.rb2
16 files changed, 54 insertions, 54 deletions
diff --git a/test/content_type/tc_content_type.rb b/test/content_type/tc_content_type.rb
index f06554c8..c79352ff 100644
--- a/test/content_type/tc_content_type.rb
+++ b/test/content_type/tc_content_type.rb
@@ -15,7 +15,7 @@ class TestContentType < Test::Unit::TestCase
o_path = "//xmlns:Override[@ContentType='%s']"
d_path = "//xmlns:Default[@ContentType='%s']"
- #default
+ # default
assert_equal(@doc.xpath("//xmlns:Default").size, 2, "There should be 2 default types")
node = @doc.xpath(d_path % Axlsx::XML_CT).first
@@ -24,7 +24,7 @@ class TestContentType < Test::Unit::TestCase
node = @doc.xpath(d_path % Axlsx::RELS_CT).first
assert_equal(node["Extension"], "#{Axlsx::RELS_EX}", "relationships content type invalid")
- #overrride
+ # overrride
assert_equal(@doc.xpath("//xmlns:Override").size, 4, "There should be 4 Override types")
node = @doc.xpath(o_path % Axlsx::APP_CT).first
diff --git a/test/drawing/tc_pic.rb b/test/drawing/tc_pic.rb
index 6760fa58..56042de5 100644
--- a/test/drawing/tc_pic.rb
+++ b/test/drawing/tc_pic.rb
@@ -18,7 +18,7 @@ class TestPic < Test::Unit::TestCase
end
def test_anchor_swapping
- #swap from one cell to two cell when end_at is specified
+ # swap from one cell to two cell when end_at is specified
assert(@image.anchor.is_a?(Axlsx::OneCellAnchor))
start_at = @image.anchor.from
@image.end_at 10, 5
@@ -28,7 +28,7 @@ class TestPic < Test::Unit::TestCase
assert_equal(10, @image.anchor.to.col)
assert_equal(5, @image.anchor.to.row)
- #swap from two cell to one cell when width or height are specified
+ # swap from two cell to one cell when width or height are specified
@image.width = 200
assert(@image.anchor.is_a?(Axlsx::OneCellAnchor))
assert_equal(start_at.col, @image.anchor.from.col)
diff --git a/test/drawing/tc_pie_series.rb b/test/drawing/tc_pie_series.rb
index ce516f83..c3f5bb3a 100644
--- a/test/drawing/tc_pie_series.rb
+++ b/test/drawing/tc_pie_series.rb
@@ -27,5 +27,5 @@ class TestPieSeries < Test::Unit::TestCase
doc = Nokogiri::XML(@series.to_xml_string)
assert(doc.xpath("//srgbClr[@val='#{@series.colors[0]}']"))
end
- #TODO test unique serialization parts
+ # TODO test unique serialization parts
end
diff --git a/test/profile.rb b/test/profile.rb
index 4805dad8..ef42c2f8 100644
--- a/test/profile.rb
+++ b/test/profile.rb
@@ -3,7 +3,7 @@
$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'axlsx'
require 'ruby-prof'
-#RubyProf.measure_mode = RubyProf::MEMORY
+# RubyProf.measure_mode = RubyProf::MEMORY
#
row = []
# Taking worst case scenario of all string data
diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb
index 78e82354..1598a658 100644
--- a/test/stylesheet/tc_styles.rb
+++ b/test/stylesheet/tc_styles.rb
@@ -62,7 +62,7 @@ class TestStyles < Test::Unit::TestCase
end
def test_do_not_alter_options_in_add_style
- #This should test all options, but for now - just the bits that we know caused some pain
+ # This should test all options, but for now - just the bits that we know caused some pain
options = { :border => { :style => :thin, :color => "FF000000" } }
@styles.add_style options
assert_equal options[:border][:style], :thin, 'thin style is stil in option'
diff --git a/test/tc_package.rb b/test/tc_package.rb
index c8f35211..cc40a6e0 100644
--- a/test/tc_package.rb
+++ b/test/tc_package.rb
@@ -249,7 +249,7 @@ class TestPackage < Test::Unit::TestCase
def test_parts
p = @package.send(:parts)
- #all parts have an entry
+ # all parts have an entry
assert_equal(p.select { |part| part[:entry] =~ /_rels\/\.rels/ }.size, 1, "rels missing")
assert_equal(p.select { |part| part[:entry] =~ /docProps\/core\.xml/ }.size, 1, "core missing")
assert_equal(p.select { |part| part[:entry] =~ /docProps\/app\.xml/ }.size, 1, "app missing")
@@ -267,10 +267,10 @@ class TestPackage < Test::Unit::TestCase
assert_equal(p.select { |part| part[:entry] =~ /xl\/pivotTables\/_rels\/pivotTable\d\.xml.rels/ }.size, @package.workbook.worksheets.first.pivot_tables.size, "one or more pivot tables rels missing")
assert_equal(p.select { |part| part[:entry] =~ /xl\/pivotCache\/pivotCacheDefinition\d\.xml/ }.size, @package.workbook.worksheets.first.pivot_tables.size, "one or more pivot tables missing")
- #no mystery parts
+ # no mystery parts
assert_equal(25, p.size)
- #sorted for correct MIME detection
+ # sorted for correct MIME detection
assert_equal("[Content_Types].xml", p[0][:entry], "first entry should be `[Content_Types].xml`")
assert_equal("_rels/.rels", p[1][:entry], "second entry should be `_rels/.rels`")
assert_match(/\Axl\//, p[2][:entry], "third entry should begin with `xl/`")
@@ -278,7 +278,7 @@ class TestPackage < Test::Unit::TestCase
def test_shared_strings_requires_part
@package.use_shared_strings = true
- @package.to_stream #ensure all cell_serializer paths are hit
+ @package.to_stream # ensure all cell_serializer paths are hit
p = @package.send(:parts)
assert_equal(p.select { |part| part[:entry] =~ /xl\/sharedStrings.xml/ }.size, 1, "shared strings table missing")
end
diff --git a/test/util/tc_simple_typed_list.rb b/test/util/tc_simple_typed_list.rb
index abcacf26..fc1ab0a2 100644
--- a/test/util/tc_simple_typed_list.rb
+++ b/test/util/tc_simple_typed_list.rb
@@ -16,7 +16,7 @@ class TestSimpleTypedList < Test::Unit::TestCase
end
def test_indexed_based_assignment
- #should not allow nil assignment
+ # should not allow nil assignment
assert_raise(ArgumentError) { @list[0] = nil }
assert_raise(ArgumentError) { @list[0] = "1" }
assert_nothing_raised { @list[0] = 1 }
@@ -57,7 +57,7 @@ class TestSimpleTypedList < Test::Unit::TestCase
@list.push 4
assert_nothing_raised { @list.delete_at 3 }
@list.unlock
- #ignore garbage
+ # ignore garbage
assert_nothing_raised { @list.delete 0 }
assert_nothing_raised { @list.delete 9 }
end
diff --git a/test/util/tc_validators.rb b/test/util/tc_validators.rb
index ba3edba6..7df2e41b 100644
--- a/test/util/tc_validators.rb
+++ b/test/util/tc_validators.rb
@@ -7,71 +7,71 @@ class TestValidators < Test::Unit::TestCase
end
def test_validators
- #unsigned_int
+ # unsigned_int
assert_nothing_raised { Axlsx.validate_unsigned_int 1 }
assert_nothing_raised { Axlsx.validate_unsigned_int(+1) }
assert_raise(ArgumentError) { Axlsx.validate_unsigned_int(-1) }
assert_raise(ArgumentError) { Axlsx.validate_unsigned_int('1') }
- #int
+ # int
assert_nothing_raised { Axlsx.validate_int(1) }
assert_nothing_raised { Axlsx.validate_int(-1) }
assert_raise(ArgumentError) { Axlsx.validate_int('a') }
assert_raise(ArgumentError) { Axlsx.validate_int(Array) }
- #boolean (as 0 or 1, :true, :false, true, false, or "true," "false")
+ # boolean (as 0 or 1, :true, :false, true, false, or "true," "false")
[0, 1, :true, :false, true, false, "true", "false"].each do |v|
assert_nothing_raised { Axlsx.validate_boolean 0 }
end
assert_raise(ArgumentError) { Axlsx.validate_boolean 2 }
- #string
+ # string
assert_nothing_raised { Axlsx.validate_string "1" }
assert_raise(ArgumentError) { Axlsx.validate_string 2 }
assert_raise(ArgumentError) { Axlsx.validate_string false }
- #float
+ # float
assert_nothing_raised { Axlsx.validate_float 1.0 }
assert_raise(ArgumentError) { Axlsx.validate_float 2 }
assert_raise(ArgumentError) { Axlsx.validate_float false }
- #pattern_type
+ # pattern_type
assert_nothing_raised { Axlsx.validate_pattern_type :none }
assert_raise(ArgumentError) { Axlsx.validate_pattern_type "none" }
assert_raise(ArgumentError) { Axlsx.validate_pattern_type "crazy_pattern" }
assert_raise(ArgumentError) { Axlsx.validate_pattern_type false }
- #gradient_type
+ # gradient_type
assert_nothing_raised { Axlsx.validate_gradient_type :path }
assert_raise(ArgumentError) { Axlsx.validate_gradient_type nil }
assert_raise(ArgumentError) { Axlsx.validate_gradient_type "fractal" }
assert_raise(ArgumentError) { Axlsx.validate_gradient_type false }
- #horizontal alignment
+ # horizontal alignment
assert_nothing_raised { Axlsx.validate_horizontal_alignment :general }
assert_raise(ArgumentError) { Axlsx.validate_horizontal_alignment nil }
assert_raise(ArgumentError) { Axlsx.validate_horizontal_alignment "wavy" }
assert_raise(ArgumentError) { Axlsx.validate_horizontal_alignment false }
- #vertical alignment
+ # vertical alignment
assert_nothing_raised { Axlsx.validate_vertical_alignment :top }
assert_raise(ArgumentError) { Axlsx.validate_vertical_alignment nil }
assert_raise(ArgumentError) { Axlsx.validate_vertical_alignment "dynamic" }
assert_raise(ArgumentError) { Axlsx.validate_vertical_alignment false }
- #contentType
+ # contentType
assert_nothing_raised { Axlsx.validate_content_type Axlsx::WORKBOOK_CT }
assert_raise(ArgumentError) { Axlsx.validate_content_type nil }
assert_raise(ArgumentError) { Axlsx.validate_content_type "http://some.url" }
assert_raise(ArgumentError) { Axlsx.validate_content_type false }
- #relationshipType
+ # relationshipType
assert_nothing_raised { Axlsx.validate_relationship_type Axlsx::WORKBOOK_R }
assert_raise(ArgumentError) { Axlsx.validate_relationship_type nil }
assert_raise(ArgumentError) { Axlsx.validate_relationship_type "http://some.url" }
assert_raise(ArgumentError) { Axlsx.validate_relationship_type false }
- #number_with_unit
+ # number_with_unit
assert_nothing_raised { Axlsx.validate_number_with_unit "210mm" }
assert_nothing_raised { Axlsx.validate_number_with_unit "8.5in" }
assert_nothing_raised { Axlsx.validate_number_with_unit "29.7cm" }
@@ -84,7 +84,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_number_with_unit "mm" }
assert_raise(ArgumentError) { Axlsx.validate_number_with_unit "-29cm" }
- #scale_10_400
+ # scale_10_400
assert_nothing_raised { Axlsx.validate_scale_10_400 10 }
assert_nothing_raised { Axlsx.validate_scale_10_400 100 }
assert_nothing_raised { Axlsx.validate_scale_10_400 400 }
@@ -93,7 +93,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_scale_10_400 400.1 }
assert_raise(ArgumentError) { Axlsx.validate_scale_10_400 "99" }
- #scale_0_10_400
+ # scale_0_10_400
assert_nothing_raised { Axlsx.validate_scale_0_10_400 0 }
assert_nothing_raised { Axlsx.validate_scale_0_10_400 10 }
assert_nothing_raised { Axlsx.validate_scale_0_10_400 100 }
@@ -103,7 +103,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_scale_0_10_400 400.1 }
assert_raise(ArgumentError) { Axlsx.validate_scale_0_10_400 "99" }
- #page_orientation
+ # page_orientation
assert_nothing_raised { Axlsx.validate_page_orientation :default }
assert_nothing_raised { Axlsx.validate_page_orientation :landscape }
assert_nothing_raised { Axlsx.validate_page_orientation :portrait }
@@ -111,7 +111,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_page_orientation 1 }
assert_raise(ArgumentError) { Axlsx.validate_page_orientation "landscape" }
- #data_validation_error_style
+ # data_validation_error_style
[:information, :stop, :warning].each do |sym|
assert_nothing_raised { Axlsx.validate_data_validation_error_style sym }
end
@@ -119,7 +119,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 'warning' }
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 0 }
- #data_validation_operator
+ # data_validation_operator
[:lessThan, :lessThanOrEqual, :equal, :notEqual, :greaterThanOrEqual, :greaterThan, :between, :notBetween].each do |sym|
assert_nothing_raised { Axlsx.validate_data_validation_operator sym }
end
@@ -127,7 +127,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 'lessThan' }
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 0 }
- #data_validation_type
+ # data_validation_type
[:custom, :data, :decimal, :list, :none, :textLength, :date, :time, :whole].each do |sym|
assert_nothing_raised { Axlsx.validate_data_validation_type sym }
end
@@ -135,7 +135,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 'decimal' }
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 0 }
- #sheet_view_type
+ # sheet_view_type
[:normal, :page_break_preview, :page_layout].each do |sym|
assert_nothing_raised { Axlsx.validate_sheet_view_type sym }
end
@@ -143,7 +143,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 'page_layout' }
assert_raise(ArgumentError) { Axlsx.validate_data_validation_error_style 0 }
- #active_pane_type
+ # active_pane_type
[:bottom_left, :bottom_right, :top_left, :top_right].each do |sym|
assert_nothing_raised { Axlsx.validate_pane_type sym }
end
@@ -151,7 +151,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_pane_type 'bottom_left' }
assert_raise(ArgumentError) { Axlsx.validate_pane_type 0 }
- #split_state_type
+ # split_state_type
[:frozen, :frozen_split, :split].each do |sym|
assert_nothing_raised { Axlsx.validate_split_state_type sym }
end
@@ -159,7 +159,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_split_state_type 'frozen_split' }
assert_raise(ArgumentError) { Axlsx.validate_split_state_type 0 }
- #display_blanks_as
+ # display_blanks_as
[:gap, :span, :zero].each do |sym|
assert_nothing_raised { Axlsx.validate_display_blanks_as sym }
end
@@ -167,7 +167,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_display_blanks_as 'other_blank' }
assert_raise(ArgumentError) { Axlsx.validate_display_blanks_as 0 }
- #view_visibility
+ # view_visibility
[:visible, :hidden, :very_hidden].each do |sym|
assert_nothing_raised { Axlsx.validate_view_visibility sym }
end
@@ -175,7 +175,7 @@ class TestValidators < Test::Unit::TestCase
assert_raise(ArgumentError) { Axlsx.validate_view_visibility 'other_visibility' }
assert_raise(ArgumentError) { Axlsx.validate_view_visibility 0 }
- #marker_symbol
+ # marker_symbol
[:default, :circle, :dash, :diamond, :dot, :picture, :plus, :square, :star, :triangle, :x].each do |sym|
assert_nothing_raised { Axlsx.validate_marker_symbol sym }
end
diff --git a/test/workbook/tc_workbook.rb b/test/workbook/tc_workbook.rb
index c5a72e48..c085ed91 100644
--- a/test/workbook/tc_workbook.rb
+++ b/test/workbook/tc_workbook.rb
@@ -90,7 +90,7 @@ class TestWorkbook < Test::Unit::TestCase
end
def test_relationships
- #current relationship size is 1 due to style relation
+ # current relationship size is 1 due to style relation
assert(@wb.relationships.size == 1)
@wb.add_worksheet
assert(@wb.relationships.size == 2)
diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb
index a4aab11c..f5264115 100644
--- a/test/workbook/worksheet/tc_cell.rb
+++ b/test/workbook/worksheet/tc_cell.rb
@@ -112,7 +112,7 @@ class TestCell < Test::Unit::TestCase
end
def test_col_ref
- #TODO move to axlsx spec
+ # TODO move to axlsx spec
assert_equal(Axlsx.col_ref(0), "A")
end
diff --git a/test/workbook/worksheet/tc_col.rb b/test/workbook/worksheet/tc_col.rb
index 80b228d0..908e9931 100644
--- a/test/workbook/worksheet/tc_col.rb
+++ b/test/workbook/worksheet/tc_col.rb
@@ -86,6 +86,6 @@ class TestCol < Test::Unit::TestCase
assert_equal(@col.style, nil)
@col.style = 1
assert_equal(@col.style, 1)
- #TODO check that the style specified is actually in the styles xfs collection
+ # TODO check that the style specified is actually in the styles xfs collection
end
end
diff --git a/test/workbook/worksheet/tc_conditional_formatting.rb b/test/workbook/worksheet/tc_conditional_formatting.rb
index dcbb3ca6..2c8292ee 100644
--- a/test/workbook/worksheet/tc_conditional_formatting.rb
+++ b/test/workbook/worksheet/tc_conditional_formatting.rb
@@ -187,7 +187,7 @@ class TestConditionalFormatting < Test::Unit::TestCase
end
def test_percent
- assert_raise(ArgumentError) { @cfr.percent = "10%" } #WRONG!
+ assert_raise(ArgumentError) { @cfr.percent = "10%" } # WRONG!
assert_nothing_raised { @cfr.percent = true }
assert_equal(@cfr.percent, true)
end
diff --git a/test/workbook/worksheet/tc_data_validation.rb b/test/workbook/worksheet/tc_data_validation.rb
index 09ce8290..3dffee39 100644
--- a/test/workbook/worksheet/tc_data_validation.rb
+++ b/test/workbook/worksheet/tc_data_validation.rb
@@ -5,7 +5,7 @@ class TestDataValidation < Test::Unit::TestCase
include CaptureWarnings
def setup
- #inverse defaults
+ # inverse defaults
@boolean_options = { :allowBlank => false, :hideDropDown => true, :showErrorMessage => false, :showInputMessage => true }
@nil_options = { :formula1 => 'foo', :formula2 => 'foo', :errorTitle => 'foo', :operator => :lessThan, :prompt => 'foo', :promptTitle => 'foo', :sqref => 'foo' }
@type_option = { :type => :whole }
@@ -171,7 +171,7 @@ class TestDataValidation < Test::Unit::TestCase
doc = Nokogiri::XML.parse(@ws.to_xml_string)
- #test attributes
+ # test attributes
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations[@count='1']/xmlns:dataValidation[@sqref='A1']
[@promptTitle='Be carful!'][@prompt='Only values between 5 and 10'][@operator='between'][@errorTitle='Wrong input']
[@error='Only values between 5 and 10'][@showErrorMessage=1][@allowBlank=1][@showInputMessage=1][@type='whole']
@@ -181,11 +181,11 @@ class TestDataValidation < Test::Unit::TestCase
[@error='Only values between 5 and 10'][@showErrorMessage=1][@allowBlank=1][@showInputMessage=1]
[@type='whole'][@errorStyle='information']")
- #test forumula1
+ # test forumula1
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula1").size)
assert doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula1='5'")
- #test forumula2
+ # test forumula2
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula2").size)
assert doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula2='10'")
end
@@ -200,7 +200,7 @@ class TestDataValidation < Test::Unit::TestCase
doc = Nokogiri::XML.parse(@ws.to_xml_string)
- #test attributes
+ # test attributes
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations[@count='1']/xmlns:dataValidation[@sqref='A1']
[@promptTitle='Be carful!'][@prompt='Only values from list'][@errorTitle='Wrong input'][@error='Only values from list']
[@showErrorMessage=1][@allowBlank=1][@showInputMessage=1][@showDropDown=1][@type='list']
@@ -209,7 +209,7 @@ class TestDataValidation < Test::Unit::TestCase
[@promptTitle='Be carful!'][@prompt='Only values from list'][@errorTitle='Wrong input'][@error='Only values from list']
[@showErrorMessage=1][@allowBlank=1][@showInputMessage=1][@showDropDown=1][@type='list'][@errorStyle='stop']")
- #test forumula1
+ # test forumula1
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula1").size)
assert doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula1='A1:A5'")
end
@@ -224,7 +224,7 @@ class TestDataValidation < Test::Unit::TestCase
doc = Nokogiri::XML.parse(@ws.to_xml_string)
- #test attributes
+ # test attributes
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations[@count='1']/xmlns:dataValidation[@sqref='A1'][@promptTitle='Be carful!']
[@prompt='Only values corresponding formula'][@errorTitle='Wrong input'][@error='Only values corresponding formula'][@showErrorMessage=1]
[@allowBlank=1][@showInputMessage=1][@type='custom'][@errorStyle='stop']").size)
@@ -232,7 +232,7 @@ class TestDataValidation < Test::Unit::TestCase
[@prompt='Only values corresponding formula'][@errorTitle='Wrong input'][@error='Only values corresponding formula']
[@showErrorMessage=1][@allowBlank=1][@showInputMessage=1][@type='custom'][@errorStyle='stop']")
- #test forumula1
+ # test forumula1
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula1").size)
assert doc.xpath("//xmlns:worksheet/xmlns:dataValidations/xmlns:dataValidation/xmlns:formula1='=5/2'")
end
@@ -251,7 +251,7 @@ class TestDataValidation < Test::Unit::TestCase
doc = Nokogiri::XML.parse(@ws.to_xml_string)
- #test attributes
+ # test attributes
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations[@count='2']/xmlns:dataValidation[@sqref='A1']
[@promptTitle='Be carful!'][@prompt='Only values between 5 and 10'][@operator='between'][@errorTitle='Wrong input']
[@error='Only values between 5 and 10'][@showErrorMessage=1][@allowBlank=1][@showInputMessage=1][@type='whole']
@@ -261,7 +261,7 @@ class TestDataValidation < Test::Unit::TestCase
[@error='Only values between 5 and 10'][@showErrorMessage=1][@allowBlank=1][@showInputMessage=1]
[@type='whole'][@errorStyle='information']")
- #test attributes
+ # test attributes
assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:dataValidations[@count='2']/xmlns:dataValidation[@sqref='B1']
[@promptTitle='Be carful!'][@prompt='Only values from list'][@errorTitle='Wrong input'][@error='Only values from list']
[@showErrorMessage=1][@allowBlank=1][@showInputMessage=1][@showDropDown=1][@type='list']
diff --git a/test/workbook/worksheet/tc_pane.rb b/test/workbook/worksheet/tc_pane.rb
index fef1eb63..9a16866b 100644
--- a/test/workbook/worksheet/tc_pane.rb
+++ b/test/workbook/worksheet/tc_pane.rb
@@ -3,7 +3,7 @@ require 'tc_helper.rb'
class TestPane < Test::Unit::TestCase
def setup
- #inverse defaults for booleans
+ # inverse defaults for booleans
@nil_options = { :active_pane => :bottom_left, :state => :frozen, :top_left_cell => 'A2' }
@int_0_options = { :x_split => 2, :y_split => 2 }
@options = @nil_options.merge(@int_0_options)
diff --git a/test/workbook/worksheet/tc_sheet_protection.rb b/test/workbook/worksheet/tc_sheet_protection.rb
index 8d5452cc..b14f3e03 100644
--- a/test/workbook/worksheet/tc_sheet_protection.rb
+++ b/test/workbook/worksheet/tc_sheet_protection.rb
@@ -22,7 +22,7 @@ require 'tc_helper.rb'
class TestSheetProtection < Test::Unit::TestCase
def setup
- #inverse defaults
+ # inverse defaults
@boolean_options = { :sheet => false, :objects => true, :scenarios => true, :format_cells => false,
:format_columns => false, :format_rows => false, :insert_columns => false, :insert_rows => false,
:insert_hyperlinks => false, :delete_columns => false, :delete_rows => false, :select_locked_cells => true,
diff --git a/test/workbook/worksheet/tc_sheet_view.rb b/test/workbook/worksheet/tc_sheet_view.rb
index fb8367a8..03030d2c 100644
--- a/test/workbook/worksheet/tc_sheet_view.rb
+++ b/test/workbook/worksheet/tc_sheet_view.rb
@@ -3,7 +3,7 @@ require 'tc_helper.rb'
class TestSheetView < Test::Unit::TestCase
def setup
- #inverse defaults for booleans
+ # inverse defaults for booleans
@boolean_options = { :right_to_left => true, :show_formulas => true, :show_outline_symbols => true,
:show_white_space => true, :tab_selected => true, :default_grid_color => false, :show_grid_lines => false,
:show_row_col_headers => false, :show_ruler => false, :show_zeros => false, :window_protection => true }