summaryrefslogtreecommitdiffhomepage
path: root/test/stylesheet
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-05 17:17:07 +0200
committerGeremia Taglialatela <[email protected]>2023-04-06 09:54:44 +0200
commit7e90a46d43fefcf5ff7c76c14b29b6998245cfc5 (patch)
tree0562b39547ee41e86504bf661390ce0d571ff066 /test/stylesheet
parente9496a58dbf17d4b9bb615f3cb630f1e32574ece (diff)
downloadcaxlsx-7e90a46d43fefcf5ff7c76c14b29b6998245cfc5.tar.gz
caxlsx-7e90a46d43fefcf5ff7c76c14b29b6998245cfc5.zip
Remove Layout/TrailingWhitespace offenses
``` rubocop --only Layout/TrailingWhitespace -a ```
Diffstat (limited to 'test/stylesheet')
-rw-r--r--test/stylesheet/tc_dxf.rb10
-rw-r--r--test/stylesheet/tc_pattern_fill.rb4
-rw-r--r--test/stylesheet/tc_styles.rb6
-rw-r--r--test/stylesheet/tc_table_style_element.rb2
4 files changed, 11 insertions, 11 deletions
diff --git a/test/stylesheet/tc_dxf.rb b/test/stylesheet/tc_dxf.rb
index e94a1614..eb5c4014 100644
--- a/test/stylesheet/tc_dxf.rb
+++ b/test/stylesheet/tc_dxf.rb
@@ -4,7 +4,7 @@ class TestDxf < Test::Unit::TestCase
def setup
@item = Axlsx::Dxf.new
- @styles = Axlsx::Styles.new
+ @styles = Axlsx::Styles.new
end
def teardown
@@ -46,7 +46,7 @@ class TestDxf < Test::Unit::TestCase
def test_font
assert_raise(ArgumentError) { @item.font = 1 }
assert_nothing_raised { @item.font = Axlsx::Font.new }
- assert @item.font.is_a? Axlsx::Font
+ assert @item.font.is_a? Axlsx::Font
end
def test_border
@@ -59,7 +59,7 @@ class TestDxf < Test::Unit::TestCase
@item.border = Axlsx::Border.new
doc = Nokogiri::XML.parse(@item.to_xml_string)
assert_equal(1, doc.xpath(".//dxf//border").size)
- assert_equal(0, doc.xpath(".//dxf//font").size)
+ assert_equal(0, doc.xpath(".//dxf//font").size)
end
def test_many_options_xml
@@ -69,13 +69,13 @@ class TestDxf < Test::Unit::TestCase
@item.font = Axlsx::Font.new
@item.protection = Axlsx::CellProtection.new
@item.numFmt = Axlsx::NumFmt.new
-
+
doc = Nokogiri::XML.parse(@item.to_xml_string)
assert_equal(1, doc.xpath(".//dxf//fill//patternFill[@patternType='solid']//fgColor[@rgb='FF000000']").size)
assert_equal(1, doc.xpath(".//dxf//font").size)
assert_equal(1, doc.xpath(".//dxf//protection").size)
assert_equal(1, doc.xpath(".//dxf//numFmt[@numFmtId='0'][@formatCode='']").size)
assert_equal(1, doc.xpath(".//dxf//alignment").size)
- assert_equal(1, doc.xpath(".//dxf//border").size)
+ assert_equal(1, doc.xpath(".//dxf//border").size)
end
end
diff --git a/test/stylesheet/tc_pattern_fill.rb b/test/stylesheet/tc_pattern_fill.rb
index 3895cffb..fef28248 100644
--- a/test/stylesheet/tc_pattern_fill.rb
+++ b/test/stylesheet/tc_pattern_fill.rb
@@ -33,9 +33,9 @@ class TestPatternFill < Test::Unit::TestCase
assert_nothing_raised { @item.patternType = :lightUp }
assert_equal(@item.patternType, :lightUp)
end
-
+
def test_to_xml_string
- @item = Axlsx::PatternFill.new :bgColor => Axlsx::Color.new(:rgb => "FF0000"), :fgColor => Axlsx::Color.new(:rgb=>"00FF00")
+ @item = Axlsx::PatternFill.new :bgColor => Axlsx::Color.new(:rgb => "FF0000"), :fgColor => Axlsx::Color.new(:rgb=>"00FF00")
doc = Nokogiri::XML(@item.to_xml_string)
assert(doc.xpath('//color[@rgb="FFFF0000"]'))
assert(doc.xpath('//color[@rgb="FF00FF00"]'))
diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb
index 503068c0..b9ccfebd 100644
--- a/test/stylesheet/tc_styles.rb
+++ b/test/stylesheet/tc_styles.rb
@@ -44,7 +44,7 @@ class TestStyles < Test::Unit::TestCase
assert_equal(@styles.borders.size, (prev_border_count+1))
current_border = @styles.borders.last
-
+
borders_array.each do |b_opts|
if b_opts[:edges]
border_pr = current_border.prs.detect{|x| x.name == b_opts[:edges].first }
@@ -289,7 +289,7 @@ class TestStyles < Test::Unit::TestCase
def test_border_top_without_border_regression
### https://github.com/axlsx-styler-gem/axlsx_styler/issues/31
-
+
borders = {
top: { style: :double, color: '0000FF' },
right: { style: :thick, color: 'FF0000' },
@@ -305,6 +305,6 @@ class TestStyles < Test::Unit::TestCase
border_pr = current_border.prs.detect{|x| x.name == edge }
assert_equal(border_pr.color.rgb, "FF#{b_opts[:color]}")
end
-
+
end
end
diff --git a/test/stylesheet/tc_table_style_element.rb b/test/stylesheet/tc_table_style_element.rb
index 9ef54e2f..554636eb 100644
--- a/test/stylesheet/tc_table_style_element.rb
+++ b/test/stylesheet/tc_table_style_element.rb
@@ -36,7 +36,7 @@ class TestTableStyleElement < Test::Unit::TestCase
assert_nothing_raised { @item.dxfId = 7 }
assert_equal(@item.dxfId, 7)
end
-
+
def test_to_xml_string
doc = Nokogiri::XML(@item.to_xml_string)
@item.type = :headerRow