summaryrefslogtreecommitdiffhomepage
path: root/test/workbook
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-09 16:55:57 +0200
committerGeremia Taglialatela <[email protected]>2023-04-09 16:55:57 +0200
commitc77a48805c17d36c4503df8cf0fe75e7b620e2d4 (patch)
tree05f26df0b6d75846d0868d4bd6d4ad090ea1073c /test/workbook
parent3befab6f5713c537f6b90b51c02882273c7f7cc9 (diff)
downloadcaxlsx-c77a48805c17d36c4503df8cf0fe75e7b620e2d4.tar.gz
caxlsx-c77a48805c17d36c4503df8cf0fe75e7b620e2d4.zip
Fix offenses related to indentation consistency
Diffstat (limited to 'test/workbook')
-rw-r--r--test/workbook/worksheet/auto_filter/tc_filter_column.rb4
-rw-r--r--test/workbook/worksheet/tc_data_validation.rb4
-rw-r--r--test/workbook/worksheet/tc_outline_pr.rb24
-rw-r--r--test/workbook/worksheet/tc_page_set_up_pr.rb18
-rw-r--r--test/workbook/worksheet/tc_pane.rb2
-rw-r--r--test/workbook/worksheet/tc_protected_range.rb22
-rw-r--r--test/workbook/worksheet/tc_sheet_format_pr.rb24
-rw-r--r--test/workbook/worksheet/tc_sheet_view.rb4
-rw-r--r--test/workbook/worksheet/tc_table_style_info.rb4
-rw-r--r--test/workbook/worksheet/tc_worksheet.rb2
10 files changed, 54 insertions, 54 deletions
diff --git a/test/workbook/worksheet/auto_filter/tc_filter_column.rb b/test/workbook/worksheet/auto_filter/tc_filter_column.rb
index 642b7b6e..88f73e0d 100644
--- a/test/workbook/worksheet/auto_filter/tc_filter_column.rb
+++ b/test/workbook/worksheet/auto_filter/tc_filter_column.rb
@@ -56,9 +56,9 @@ class TestFilterColumn < Test::Unit::TestCase
def test_col_id=
assert_raise ArgumentError do
- @filter_column.col_id = :bar
+ @filter_column.col_id = :bar
end
- assert_nothing_raised { @filter_column.col_id = 7 }
+ assert_nothing_raised { @filter_column.col_id = 7 }
end
def test_to_xml_string
diff --git a/test/workbook/worksheet/tc_data_validation.rb b/test/workbook/worksheet/tc_data_validation.rb
index 59fd34f6..f93c91fe 100644
--- a/test/workbook/worksheet/tc_data_validation.rb
+++ b/test/workbook/worksheet/tc_data_validation.rb
@@ -272,7 +272,7 @@ class TestDataValidation < Test::Unit::TestCase
end
def test_empty_attributes
- v = Axlsx::DataValidation.new
- assert_equal(nil, v.send(:get_valid_attributes))
+ v = Axlsx::DataValidation.new
+ assert_equal(nil, v.send(:get_valid_attributes))
end
end
diff --git a/test/workbook/worksheet/tc_outline_pr.rb b/test/workbook/worksheet/tc_outline_pr.rb
index a40108b1..d2906a61 100644
--- a/test/workbook/worksheet/tc_outline_pr.rb
+++ b/test/workbook/worksheet/tc_outline_pr.rb
@@ -1,19 +1,19 @@
require 'tc_helper.rb'
class TestOutlinePr < Test::Unit::TestCase
- def setup
- @outline_pr = Axlsx::OutlinePr.new(:summary_below => false, :summary_right => true, :apply_styles => false)
- end
+ def setup
+ @outline_pr = Axlsx::OutlinePr.new(:summary_below => false, :summary_right => true, :apply_styles => false)
+ end
- def test_summary_below
- assert_equal false, @outline_pr.summary_below
- end
+ def test_summary_below
+ assert_equal false, @outline_pr.summary_below
+ end
- def test_summary_right
- assert_equal true, @outline_pr.summary_right
- end
+ def test_summary_right
+ assert_equal true, @outline_pr.summary_right
+ end
- def test_apply_styles
- assert_equal false, @outline_pr.apply_styles
- end
+ def test_apply_styles
+ assert_equal false, @outline_pr.apply_styles
+ end
end
diff --git a/test/workbook/worksheet/tc_page_set_up_pr.rb b/test/workbook/worksheet/tc_page_set_up_pr.rb
index d04097d0..8ca4f825 100644
--- a/test/workbook/worksheet/tc_page_set_up_pr.rb
+++ b/test/workbook/worksheet/tc_page_set_up_pr.rb
@@ -1,15 +1,15 @@
require 'tc_helper.rb'
class TestPageSetUpPr < Test::Unit::TestCase
- def setup
- @page_setup_pr = Axlsx::PageSetUpPr.new(:fit_to_page => true, :auto_page_breaks => true)
- end
+ def setup
+ @page_setup_pr = Axlsx::PageSetUpPr.new(:fit_to_page => true, :auto_page_breaks => true)
+ end
- def test_fit_to_page
- assert_equal true, @page_setup_pr.fit_to_page
- end
+ def test_fit_to_page
+ assert_equal true, @page_setup_pr.fit_to_page
+ end
- def test_auto_page_breaks
- assert_equal true, @page_setup_pr.auto_page_breaks
- end
+ def test_auto_page_breaks
+ assert_equal true, @page_setup_pr.auto_page_breaks
+ end
end
diff --git a/test/workbook/worksheet/tc_pane.rb b/test/workbook/worksheet/tc_pane.rb
index d5f05933..fef1eb63 100644
--- a/test/workbook/worksheet/tc_pane.rb
+++ b/test/workbook/worksheet/tc_pane.rb
@@ -6,7 +6,7 @@ class TestPane < Test::Unit::TestCase
#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)
+ @options = @nil_options.merge(@int_0_options)
@pane = Axlsx::Pane.new(@options)
end
diff --git a/test/workbook/worksheet/tc_protected_range.rb b/test/workbook/worksheet/tc_protected_range.rb
index 6d609097..906c6014 100644
--- a/test/workbook/worksheet/tc_protected_range.rb
+++ b/test/workbook/worksheet/tc_protected_range.rb
@@ -1,16 +1,16 @@
require 'tc_helper.rb'
class TestProtectedRange < Test::Unit::TestCase
-def setup
- @p = Axlsx::Package.new
- @ws = @p.workbook.add_worksheet { |sheet| sheet.add_row [1, 2, 3, 4, 5, 6, 7, 8, 9] }
-end
+ def setup
+ @p = Axlsx::Package.new
+ @ws = @p.workbook.add_worksheet { |sheet| sheet.add_row [1, 2, 3, 4, 5, 6, 7, 8, 9] }
+ end
-def test_initialize_options
- assert_nothing_raised { Axlsx::ProtectedRange.new(:sqref => 'A1:B1', :name => "only bob") }
-end
+ def test_initialize_options
+ assert_nothing_raised { Axlsx::ProtectedRange.new(:sqref => 'A1:B1', :name => "only bob") }
+ end
-def test_range
- r = @ws.protect_range('A1:B1')
- assert_equal('A1:B1', r.sqref)
-end
+ def test_range
+ r = @ws.protect_range('A1:B1')
+ assert_equal('A1:B1', r.sqref)
+ end
end
diff --git a/test/workbook/worksheet/tc_sheet_format_pr.rb b/test/workbook/worksheet/tc_sheet_format_pr.rb
index 48643bc6..1240da26 100644
--- a/test/workbook/worksheet/tc_sheet_format_pr.rb
+++ b/test/workbook/worksheet/tc_sheet_format_pr.rb
@@ -44,33 +44,33 @@ class TestSheetFormatPr < Test::Unit::TestCase
end
def test_default_row_height
- assert_raise(ArgumentError) { @sheet_format_pr.default_row_height = :foo }
- assert_nothing_raised { @sheet_format_pr.default_row_height = 1.0 }
+ assert_raise(ArgumentError) { @sheet_format_pr.default_row_height = :foo }
+ assert_nothing_raised { @sheet_format_pr.default_row_height = 1.0 }
end
def test_default_col_width
- assert_raise(ArgumentError) { @sheet_format_pr.default_col_width = :foo }
- assert_nothing_raised { @sheet_format_pr.default_col_width = 1.0 }
+ assert_raise(ArgumentError) { @sheet_format_pr.default_col_width = :foo }
+ assert_nothing_raised { @sheet_format_pr.default_col_width = 1.0 }
end
def test_custom_height
- assert_raise(ArgumentError) { @sheet_format_pr.custom_height = :foo }
- assert_nothing_raised { @sheet_format_pr.custom_height = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.custom_height = :foo }
+ assert_nothing_raised { @sheet_format_pr.custom_height = true }
end
def test_zero_height
- assert_raise(ArgumentError) { @sheet_format_pr.zero_height = :foo }
- assert_nothing_raised { @sheet_format_pr.zero_height = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.zero_height = :foo }
+ assert_nothing_raised { @sheet_format_pr.zero_height = true }
end
def test_thick_top
- assert_raise(ArgumentError) { @sheet_format_pr.thick_top = :foo }
- assert_nothing_raised { @sheet_format_pr.thick_top = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.thick_top = :foo }
+ assert_nothing_raised { @sheet_format_pr.thick_top = true }
end
def test_thick_bottom
- assert_raise(ArgumentError) { @sheet_format_pr.thick_bottom = :foo }
- assert_nothing_raised { @sheet_format_pr.thick_bottom = true }
+ assert_raise(ArgumentError) { @sheet_format_pr.thick_bottom = :foo }
+ assert_nothing_raised { @sheet_format_pr.thick_bottom = true }
end
def test_to_xml_string
diff --git a/test/workbook/worksheet/tc_sheet_view.rb b/test/workbook/worksheet/tc_sheet_view.rb
index a09287aa..fb8367a8 100644
--- a/test/workbook/worksheet/tc_sheet_view.rb
+++ b/test/workbook/worksheet/tc_sheet_view.rb
@@ -205,7 +205,7 @@ class TestSheetView < Test::Unit::TestCase
end
def test_add_selection
- @sv.add_selection(:top_left, :active_cell => "A1")
- assert_equal('A1', @sv.selections[:top_left].active_cell)
+ @sv.add_selection(:top_left, :active_cell => "A1")
+ assert_equal('A1', @sv.selections[:top_left].active_cell)
end
end
diff --git a/test/workbook/worksheet/tc_table_style_info.rb b/test/workbook/worksheet/tc_table_style_info.rb
index 2067959c..b56ac560 100644
--- a/test/workbook/worksheet/tc_table_style_info.rb
+++ b/test/workbook/worksheet/tc_table_style_info.rb
@@ -25,8 +25,8 @@ class TestTableStyleInfo < Test::Unit::TestCase
def test_boolean_properties
table_style = Axlsx::TableStyleInfo.new
@options.keys.each do |key|
- assert_nothing_raised { table_style.send("#{key.to_sym}=", true) }
- assert_raises(ArgumentError) { table_style.send(key.to_sym, 'foo') }
+ assert_nothing_raised { table_style.send("#{key.to_sym}=", true) }
+ assert_raises(ArgumentError) { table_style.send(key.to_sym, 'foo') }
end
end
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb
index bae9f904..6c8e0781 100644
--- a/test/workbook/worksheet/tc_worksheet.rb
+++ b/test/workbook/worksheet/tc_worksheet.rb
@@ -348,7 +348,7 @@ class TestWorksheet < Test::Unit::TestCase
end
def test_to_xml_string_row_breaks
- @ws.add_page_break("A1")
+ @ws.add_page_break("A1")
doc = Nokogiri::XML(@ws.to_xml_string)
assert_equal(doc.xpath('//xmlns:worksheet/xmlns:rowBreaks/xmlns:brk[@id="0"]').size, 1)
end