diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-05 17:34:58 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-06 09:55:27 +0200 |
| commit | b5d7a7a1917adb12e3ea04abe261a37f8aff7f56 (patch) | |
| tree | 8e99004348e47712008b9af75da3808721e8a659 | |
| parent | 9b246ec6395d49f09ab85ce0a2c024bf8d086d0c (diff) | |
| download | caxlsx-b5d7a7a1917adb12e3ea04abe261a37f8aff7f56.tar.gz caxlsx-b5d7a7a1917adb12e3ea04abe261a37f8aff7f56.zip | |
Fix Layout/EmptyLines offenses
```
rubocop --only Layout/EmptyLines -a
```
60 files changed, 0 insertions, 96 deletions
@@ -13,7 +13,6 @@ task :gendoc do system "yard stats --list-undoc" end - require 'rake/testtask' Rake::TestTask.new do |t| t.libs << 'test' diff --git a/lib/axlsx/drawing/bar_series.rb b/lib/axlsx/drawing/bar_series.rb index 344d3fd8..e90a2818 100644 --- a/lib/axlsx/drawing/bar_series.rb +++ b/lib/axlsx/drawing/bar_series.rb @@ -5,7 +5,6 @@ module Axlsx # @see Chart#add_series class BarSeries < Series - # The data for this series. # @return [NumDataSource] attr_reader :data diff --git a/lib/axlsx/drawing/cat_axis.rb b/lib/axlsx/drawing/cat_axis.rb index 0751c827..6e61d336 100644 --- a/lib/axlsx/drawing/cat_axis.rb +++ b/lib/axlsx/drawing/cat_axis.rb @@ -80,5 +80,4 @@ module Axlsx end - end diff --git a/lib/axlsx/drawing/d_lbls.rb b/lib/axlsx/drawing/d_lbls.rb index 0c8185f0..8623fd8a 100644 --- a/lib/axlsx/drawing/d_lbls.rb +++ b/lib/axlsx/drawing/d_lbls.rb @@ -65,7 +65,6 @@ module Axlsx @d_lbl_pos = label_position end - # serializes the data labels # @return [String] def to_xml_string(str = '') @@ -86,6 +85,5 @@ module Axlsx @show_leader_lines = nil end - end end diff --git a/lib/axlsx/drawing/drawing.rb b/lib/axlsx/drawing/drawing.rb index 33d38cef..87937d72 100644 --- a/lib/axlsx/drawing/drawing.rb +++ b/lib/axlsx/drawing/drawing.rb @@ -76,7 +76,6 @@ module Axlsx @anchors = SimpleTypedList.new [TwoCellAnchor, OneCellAnchor] end - # Adds an image to the chart If th end_at option is specified we create a two cell anchor. By default we use a one cell anchor. # @note The recommended way to manage images is to use Worksheet.add_image. Please refer to that method for documentation. # @see Worksheet#add_image diff --git a/lib/axlsx/drawing/line_3D_chart.rb b/lib/axlsx/drawing/line_3D_chart.rb index 57186c2f..8816d2e7 100644 --- a/lib/axlsx/drawing/line_3D_chart.rb +++ b/lib/axlsx/drawing/line_3D_chart.rb @@ -47,7 +47,6 @@ module Axlsx axes.add_axis :ser_axis, SerAxis end - # @see gapDepth def gap_depth=(v) RegexValidator.validate "Line3DChart.gapWidth", GAP_AMOUNT_PERCENT, v diff --git a/lib/axlsx/drawing/marker.rb b/lib/axlsx/drawing/marker.rb index 7307fcc9..7ef77f21 100644 --- a/lib/axlsx/drawing/marker.rb +++ b/lib/axlsx/drawing/marker.rb @@ -77,7 +77,6 @@ module Axlsx [x, y] end - end end diff --git a/lib/axlsx/drawing/num_data_source.rb b/lib/axlsx/drawing/num_data_source.rb index 24bb9c4d..028b75d2 100644 --- a/lib/axlsx/drawing/num_data_source.rb +++ b/lib/axlsx/drawing/num_data_source.rb @@ -22,7 +22,6 @@ module Axlsx parse_options options end - # The tag name to use when serializing this data source. # Only items defined in allowed_tag_names are allowed # @return [Symbol] diff --git a/lib/axlsx/drawing/pie_3D_chart.rb b/lib/axlsx/drawing/pie_3D_chart.rb index 3b1e0c5c..e06e8d57 100644 --- a/lib/axlsx/drawing/pie_3D_chart.rb +++ b/lib/axlsx/drawing/pie_3D_chart.rb @@ -1,6 +1,5 @@ module Axlsx - # The Pie3DChart is a three dimentional piechart (who would have guessed?) that you can add to your worksheet. # @see Worksheet#add_chart # @see Chart#add_series diff --git a/lib/axlsx/drawing/ser_axis.rb b/lib/axlsx/drawing/ser_axis.rb index 3150adaa..805e4244 100644 --- a/lib/axlsx/drawing/ser_axis.rb +++ b/lib/axlsx/drawing/ser_axis.rb @@ -40,5 +40,4 @@ module Axlsx end end - end diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb index acd55586..e866444b 100644 --- a/lib/axlsx/package.rb +++ b/lib/axlsx/package.rb @@ -35,8 +35,6 @@ module Axlsx workbook.use_autowidth = v end - - # Shortcut to determine if the workbook is configured to use shared strings # @see Workbook#use_shared_strings def use_shared_strings @@ -120,7 +118,6 @@ module Axlsx Relationship.clear_ids_cache end - # Serialize your workbook to a StringIO instance # @param [Boolean] confirm_valid Validate the package prior to serialization. # @return [StringIO|Boolean] False if confirm_valid and validation errors exist. rewound string IO if not. @@ -225,7 +222,6 @@ module Axlsx parts << {:entry => "xl/#{drawing.pn}", :doc => drawing, :schema => DRAWING_XSD} end - workbook.tables.each do |table| parts << {:entry => "xl/#{table.pn}", :doc => table, :schema => SML_XSD} end diff --git a/lib/axlsx/stylesheet/cell_alignment.rb b/lib/axlsx/stylesheet/cell_alignment.rb index 8f93f4d7..45fe0e7d 100644 --- a/lib/axlsx/stylesheet/cell_alignment.rb +++ b/lib/axlsx/stylesheet/cell_alignment.rb @@ -1,12 +1,10 @@ module Axlsx - # CellAlignment stores information about the cell alignment of a style Xf Object. # @note Using Styles#add_style is the recommended way to manage cell alignment. # @see Styles#add_style class CellAlignment - include Axlsx::SerializedAttributes include Axlsx::OptionsParser @@ -25,8 +23,6 @@ module Axlsx parse_options options end - - # The horizontal alignment of the cell. # @note # The horizontal cell alignement style must be one of diff --git a/lib/axlsx/stylesheet/fill.rb b/lib/axlsx/stylesheet/fill.rb index 4fa58aef..9b124e8d 100644 --- a/lib/axlsx/stylesheet/fill.rb +++ b/lib/axlsx/stylesheet/fill.rb @@ -29,6 +29,5 @@ module Axlsx # @see fill_type def fill_type=(v) DataTypeValidator.validate "Fill.fill_type", [PatternFill, GradientFill], v; @fill_type = v; end - end end diff --git a/lib/axlsx/stylesheet/xf.rb b/lib/axlsx/stylesheet/xf.rb index 3eb3da06..9aaba6fa 100644 --- a/lib/axlsx/stylesheet/xf.rb +++ b/lib/axlsx/stylesheet/xf.rb @@ -141,6 +141,5 @@ module Axlsx str << '</xf>' end - end end diff --git a/lib/axlsx/util/accessors.rb b/lib/axlsx/util/accessors.rb index d21388a0..3eab1d39 100644 --- a/lib/axlsx/util/accessors.rb +++ b/lib/axlsx/util/accessors.rb @@ -22,7 +22,6 @@ module Axlsx validated_attr_accessor(symbols, :validate_string) end - # Creates one or more usigned integer attr_accessors # @param [Array] symbols An array of symbols representing the # names of the attributes you will add to your class diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb index 2284a8e3..7e26c478 100644 --- a/lib/axlsx/util/constants.rb +++ b/lib/axlsx/util/constants.rb @@ -162,7 +162,6 @@ module Axlsx #drawing content type DRAWING_CT = "application/vnd.openxmlformats-officedocument.drawing+xml".freeze - # xml content type extensions XML_EX = "xml".freeze diff --git a/lib/axlsx/util/simple_typed_list.rb b/lib/axlsx/util/simple_typed_list.rb index ac8b1679..5a15ddff 100644 --- a/lib/axlsx/util/simple_typed_list.rb +++ b/lib/axlsx/util/simple_typed_list.rb @@ -99,7 +99,6 @@ module Axlsx alias :push :<< - # delete the item from the list # @param [Any] v The item to be deleted. # @raise [ArgumentError] if the item's index is protected by locking @@ -174,5 +173,4 @@ module Axlsx end - end diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index 01aef03c..9e3d0de1 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -62,7 +62,6 @@ module Axlsx end end - # Requires that the value can be converted to an integer # @para, [Any] v the value to validate # @raise [ArgumentError] raised if the value cannot be converted to an integer diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index 9797cb09..b5d229e1 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -42,7 +42,6 @@ require 'axlsx/workbook/worksheet/col_breaks' require 'axlsx/workbook/workbook_view' require 'axlsx/workbook/workbook_views' - require 'axlsx/workbook/worksheet/worksheet.rb' require 'axlsx/workbook/shared_strings_table.rb' require 'axlsx/workbook/defined_name.rb' @@ -108,7 +107,6 @@ require 'axlsx/workbook/worksheet/selection.rb' @is_reversed = v end - # A collection of worksheets associated with this workbook. # @note The recommended way to manage worksheets is add_worksheet # @see Workbook#add_worksheet @@ -139,7 +137,6 @@ require 'axlsx/workbook/worksheet/selection.rb' # pretty sure this two are always empty and can be removed. - # A colllection of tables associated with this workbook # @note The recommended way to manage drawings is Worksheet#add_table # @see Worksheet#add_table @@ -216,11 +213,9 @@ require 'axlsx/workbook/worksheet/selection.rb' self.styles_applied = true end - # Indicates if the epoc date for serialization should be 1904. If false, 1900 is used. @@date1904 = false - # A quick helper to retrive a worksheet by name # @param [String] name The name of the sheet you are looking for # @return [Worksheet] The sheet found, or nil @@ -243,7 +238,6 @@ require 'axlsx/workbook/worksheet/selection.rb' @pivot_tables = SimpleTypedList.new PivotTable @comments = SimpleTypedList.new Comments - @use_autowidth = true @bold_font_multiplier = BOLD_FONT_MULTIPLIER @font_scale_divisor = FONT_SCALE_DIVISOR diff --git a/lib/axlsx/workbook/workbook_view.rb b/lib/axlsx/workbook/workbook_view.rb index e0d38cae..b81fd4f4 100644 --- a/lib/axlsx/workbook/workbook_view.rb +++ b/lib/axlsx/workbook/workbook_view.rb @@ -31,7 +31,6 @@ module Axlsx include Axlsx::OptionsParser include Axlsx::Accessors - # Creates a new BookView object # @param [Hash] options A hash of key/value pairs that will be mapped to this instances attributes. # @option [Symbol] visibility Specifies visible state of the workbook window. The default value for this attribute is :visible. @@ -52,7 +51,6 @@ module Axlsx yield self if block_given? end - unsigned_int_attr_accessor :x_window, :y_window, :window_width, :window_height, :tab_ratio, :first_sheet, :active_tab @@ -67,7 +65,6 @@ module Axlsx boolean_attr_accessor :minimized, :show_horizontal_scroll, :show_vertical_scroll, :show_sheet_tabs, :auto_filter_date_grouping - # Serialize the WorkbookView # @param [String] str # @return [String] diff --git a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb index 215b66fe..11356c0a 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/filters.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/filters.rb @@ -113,7 +113,6 @@ module Axlsx @val = value end - #Filter value used in the criteria. attr_accessor :val @@ -124,7 +123,6 @@ module Axlsx end end - # This collection is used to express a group of dates or times which are # used in an AutoFilter criteria. Values are always written in the calendar # type of the first date encountered in the filter range, so that all diff --git a/lib/axlsx/workbook/worksheet/color_scale.rb b/lib/axlsx/workbook/worksheet/color_scale.rb index 127b3e96..dc347a6a 100644 --- a/lib/axlsx/workbook/worksheet/color_scale.rb +++ b/lib/axlsx/workbook/worksheet/color_scale.rb @@ -73,7 +73,6 @@ module Axlsx {:cfvo => value_objects.last, :color => colors.last} end - # removes the cfvo and color pair at the index specified. # @param [Integer] index The index of the cfvo and color object to delete # @note you cannot remove the first two cfvo and color pairs diff --git a/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb b/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb index a3959fe5..8fa0c5b5 100644 --- a/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb +++ b/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb @@ -132,7 +132,6 @@ module Axlsx # thisMonth, lastMonth, nextMonth, thisWeek, lastWeek, nextWeek attr_reader :timePeriod - # colorScale (Color Scale) # The color scale to apply to this conditional formatting # @return [ColorScale] @@ -201,7 +200,6 @@ module Axlsx @icon_set = v end - # Serializes the conditional formatting rule # @param [String] str # @return [String] diff --git a/lib/axlsx/workbook/worksheet/data_validation.rb b/lib/axlsx/workbook/worksheet/data_validation.rb index 94a9e0c9..194c9a27 100644 --- a/lib/axlsx/workbook/worksheet/data_validation.rb +++ b/lib/axlsx/workbook/worksheet/data_validation.rb @@ -175,7 +175,6 @@ module Axlsx # default none attr_reader :type - # @see formula1 def formula1=(v); Axlsx::validate_string(v); @formula1 = v end diff --git a/lib/axlsx/workbook/worksheet/page_setup.rb b/lib/axlsx/workbook/worksheet/page_setup.rb index 9558579e..d7abcbc2 100644 --- a/lib/axlsx/workbook/worksheet/page_setup.rb +++ b/lib/axlsx/workbook/worksheet/page_setup.rb @@ -182,7 +182,6 @@ module Axlsx # @return [Integer] attr_reader :paper_size - # Sets the paper size for printing. # @see PageSetup#paper_size # @return integer @@ -221,7 +220,6 @@ module Axlsx [@fit_to_width, @fit_to_height] end - # helper method for worksheet to determine if the page setup is configured for fit to page printing # We treat any page set up that has a value set for fit_to_width or fit_to_height value as fit_to_page. # @return [Boolean] diff --git a/lib/axlsx/workbook/worksheet/pane.rb b/lib/axlsx/workbook/worksheet/pane.rb index 321294da..9c8671e6 100644 --- a/lib/axlsx/workbook/worksheet/pane.rb +++ b/lib/axlsx/workbook/worksheet/pane.rb @@ -49,7 +49,6 @@ module Axlsx # default nil attr_reader :active_pane - # Split State # Indicates whether the pane has horizontal / vertical # splits, and whether those splits are frozen. diff --git a/lib/axlsx/workbook/worksheet/pivot_table.rb b/lib/axlsx/workbook/worksheet/pivot_table.rb index 1a3682af..23d9828e 100644 --- a/lib/axlsx/workbook/worksheet/pivot_table.rb +++ b/lib/axlsx/workbook/worksheet/pivot_table.rb @@ -91,7 +91,6 @@ module Axlsx # @return [Array] attr_reader :rows - # (see #rows) def rows=(v) DataTypeValidator.validate "#{self.class}.rows", [Array], v diff --git a/lib/axlsx/workbook/worksheet/sheet_view.rb b/lib/axlsx/workbook/worksheet/sheet_view.rb index e6e114d7..0ca87b3b 100644 --- a/lib/axlsx/workbook/worksheet/sheet_view.rb +++ b/lib/axlsx/workbook/worksheet/sheet_view.rb @@ -48,7 +48,6 @@ module Axlsx :zoom_scale_sheet_layout_view, :zoom_scale_page_layout_view, :zoom_scale_normal, :workbook_view_id, :view, :top_left_cell, :color_id, :zoom_scale - # instance values that must be serialized as their own elements - e.g. not attributes. CHILD_ELEMENTS = [ :pane, :selections ] @@ -85,7 +84,6 @@ module Axlsx # default nil attr_reader :top_left_cell - # View Type # Indicates the view type. # Options are @@ -117,7 +115,6 @@ module Axlsx # default 100 attr_reader :zoom_scale - # Zoom Scale Normal View # Zoom magnification to use when in normal view, # representing percent values. This attribute is @@ -130,7 +127,6 @@ module Axlsx # default 0 attr_reader :zoom_scale_normal - # Zoom Scale Page Layout View # Zoom magnification to use when in page layout # view, representing percent values. This attribute @@ -143,7 +139,6 @@ module Axlsx # default 0 attr_reader :zoom_scale_page_layout_view - # Zoom Scale Page Break Preview # Zoom magnification to use when in page break # preview, representing percent values. This diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index cb176455..9a9c4506 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -173,7 +173,6 @@ module Axlsx page_setup.fit_to_page? end - # Column info for the sheet # @return [SimpleTypedList] def column_info @@ -792,7 +791,6 @@ module Axlsx @merged_cells ||= MergedCells.new self end - # Helper method for parsingout the root node for worksheet # @return [String] def worksheet_node diff --git a/lib/axlsx/workbook/worksheet/worksheet_comments.rb b/lib/axlsx/workbook/worksheet/worksheet_comments.rb index c6dd5545..e976ad5c 100644 --- a/lib/axlsx/workbook/worksheet/worksheet_comments.rb +++ b/lib/axlsx/workbook/worksheet/worksheet_comments.rb @@ -33,7 +33,6 @@ module Axlsx comments.relationships end - # Helper method to tell us if there are comments in the comments collection # @return [Boolean] def has_comments? diff --git a/test/drawing/tc_axis.rb b/test/drawing/tc_axis.rb index 71e5b6b2..b8be916b 100644 --- a/test/drawing/tc_axis.rb +++ b/test/drawing/tc_axis.rb @@ -5,7 +5,6 @@ class TestAxis < Test::Unit::TestCase @axis = Axlsx::Axis.new :gridlines => false, :title => 'Foo' end - def test_initialization assert_equal(@axis.ax_pos, :b, "axis position default incorrect") assert_equal(@axis.tick_lbl_pos, :nextTo, "tick label position default incorrect") diff --git a/test/drawing/tc_hyperlink.rb b/test/drawing/tc_hyperlink.rb index 3a95886a..d4fd4e13 100644 --- a/test/drawing/tc_hyperlink.rb +++ b/test/drawing/tc_hyperlink.rb @@ -13,7 +13,6 @@ class TestHyperlink < Test::Unit::TestCase def teardown end - def test_href assert_nothing_raised { @hyperlink.href = "http://axlsx.blogspot.com" } assert_equal(@hyperlink.href, "http://axlsx.blogspot.com") diff --git a/test/drawing/tc_line_3d_chart.rb b/test/drawing/tc_line_3d_chart.rb index b419e00a..ea0748c7 100644 --- a/test/drawing/tc_line_3d_chart.rb +++ b/test/drawing/tc_line_3d_chart.rb @@ -32,7 +32,6 @@ class TestLine3DChart < Test::Unit::TestCase assert(@chart.gapDepth == "200%") end - def test_to_xml schema = Nokogiri::XML::Schema(File.open(Axlsx::DRAWING_XSD)) doc = Nokogiri::XML(@chart.to_xml_string) diff --git a/test/drawing/tc_picture_locking.rb b/test/drawing/tc_picture_locking.rb index c0a828aa..794c8f6a 100644 --- a/test/drawing/tc_picture_locking.rb +++ b/test/drawing/tc_picture_locking.rb @@ -66,7 +66,4 @@ class TestPictureLocking < Test::Unit::TestCase assert_equal(@item.noChangeShapeType, false ) end - - - end diff --git a/test/drawing/tc_scaling.rb b/test/drawing/tc_scaling.rb index 01e21a5d..361f0b5d 100644 --- a/test/drawing/tc_scaling.rb +++ b/test/drawing/tc_scaling.rb @@ -22,7 +22,6 @@ class TestScaling < Test::Unit::TestCase assert_nothing_raised {@scaling.orientation = :maxMin} end - def test_max assert_raise(ArgumentError) { @scaling.max = 1} assert_nothing_raised {@scaling.max = 10.5} diff --git a/test/drawing/tc_ser_axis.rb b/test/drawing/tc_ser_axis.rb index 7febafce..342099cc 100644 --- a/test/drawing/tc_ser_axis.rb +++ b/test/drawing/tc_ser_axis.rb @@ -14,14 +14,12 @@ class TestSerAxis < Test::Unit::TestCase assert_equal(a.tick_mark_skip, 7) end - def test_tick_lbl_skip assert_raise(ArgumentError, "requires valid tick_lbl_skip") { @axis.tick_lbl_skip = -1 } assert_nothing_raised("accepts valid tick_lbl_skip") { @axis.tick_lbl_skip = 1 } assert_equal(@axis.tick_lbl_skip, 1) end - def test_tick_mark_skip assert_raise(ArgumentError, "requires valid tick_mark_skip") { @axis.tick_mark_skip = :my_eyes } assert_nothing_raised("accepts valid tick_mark_skip") { @axis.tick_mark_skip = 2 } diff --git a/test/drawing/tc_view_3D.rb b/test/drawing/tc_view_3D.rb index 5f6809ef..175428ca 100644 --- a/test/drawing/tc_view_3D.rb +++ b/test/drawing/tc_view_3D.rb @@ -38,7 +38,6 @@ class TestView3D < Test::Unit::TestCase assert_nothing_raised {@view.depth_percent = "20%"} end - def test_rAngAx assert_raise(ArgumentError) {@view.rAngAx = "bob"} assert_nothing_raised {@view.rAngAx = true} @@ -49,6 +48,4 @@ class TestView3D < Test::Unit::TestCase assert_nothing_raised {@view.perspective = 30} end - - end diff --git a/test/stylesheet/tc_color.rb b/test/stylesheet/tc_color.rb index dd8e98d2..660cc672 100644 --- a/test/stylesheet/tc_color.rb +++ b/test/stylesheet/tc_color.rb @@ -39,5 +39,4 @@ class TestColor < Test::Unit::TestCase assert_equal(@item.tint, -1.0 ) end - end diff --git a/test/stylesheet/tc_font.rb b/test/stylesheet/tc_font.rb index 4d548d7c..58f84b08 100644 --- a/test/stylesheet/tc_font.rb +++ b/test/stylesheet/tc_font.rb @@ -9,7 +9,6 @@ class TestFont < Test::Unit::TestCase def teardown end - def test_initialiation assert_equal(@item.name, nil) assert_equal(@item.charset, nil) @@ -26,8 +25,6 @@ class TestFont < Test::Unit::TestCase assert_equal(@item.sz, nil) end - - # def name=(v) Axlsx::validate_string v; @name = v end def test_name assert_raise(ArgumentError) { @item.name = 7 } diff --git a/test/stylesheet/tc_gradient_fill.rb b/test/stylesheet/tc_gradient_fill.rb index 546941d7..b8ce757b 100644 --- a/test/stylesheet/tc_gradient_fill.rb +++ b/test/stylesheet/tc_gradient_fill.rb @@ -9,7 +9,6 @@ class TestGradientFill < Test::Unit::TestCase def teardown end - def test_initialiation assert_equal(@item.type, :linear) assert_equal(@item.degree, nil) diff --git a/test/stylesheet/tc_gradient_stop.rb b/test/stylesheet/tc_gradient_stop.rb index f1cf5183..1340e225 100644 --- a/test/stylesheet/tc_gradient_stop.rb +++ b/test/stylesheet/tc_gradient_stop.rb @@ -9,7 +9,6 @@ class TestGradientStop < Test::Unit::TestCase def teardown end - def test_initialiation assert_equal(@item.color.rgb, "FFFF0000") assert_equal(@item.position, 1.0) diff --git a/test/stylesheet/tc_num_fmt.rb b/test/stylesheet/tc_num_fmt.rb index b5b73929..5309f189 100644 --- a/test/stylesheet/tc_num_fmt.rb +++ b/test/stylesheet/tc_num_fmt.rb @@ -9,7 +9,6 @@ class TestNumFmt < Test::Unit::TestCase def teardown end - def test_initialiation assert_equal(@item.numFmtId, 0) assert_equal(@item.formatCode, "") diff --git a/test/stylesheet/tc_pattern_fill.rb b/test/stylesheet/tc_pattern_fill.rb index fef28248..ed567c7e 100644 --- a/test/stylesheet/tc_pattern_fill.rb +++ b/test/stylesheet/tc_pattern_fill.rb @@ -9,7 +9,6 @@ class TestPatternFill < Test::Unit::TestCase def teardown end - def test_initialiation assert_equal(@item.patternType, :none) assert_equal(@item.bgColor, nil) diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb index b9ccfebd..9c7d56c9 100644 --- a/test/stylesheet/tc_styles.rb +++ b/test/stylesheet/tc_styles.rb @@ -212,7 +212,6 @@ class TestStyles < Test::Unit::TestCase assert_equal(xf.protection.locked, true, "cell locking set") assert_raise(ArgumentError, "should reject invalid borderId") { @styles.add_style :border => 2 } - assert_equal(xf.applyProtection, true, "protection applied") assert_equal(xf.applyBorder, true, "border applied") assert_equal(xf.applyNumberFormat,true, "number format applied") diff --git a/test/tc_axlsx.rb b/test/tc_axlsx.rb index 35fd5ea5..89aaea5f 100644 --- a/test/tc_axlsx.rb +++ b/test/tc_axlsx.rb @@ -22,7 +22,6 @@ class TestAxlsx < Test::Unit::TestCase assert_equal false, Axlsx.trust_input end - def test_trust_input_can_be_set_to_true # Class variables like this are not reset between test runs, so we have # to save and restore the original value manually. diff --git a/test/tc_package.rb b/test/tc_package.rb index f7de1992..82c4cb83 100644 --- a/test/tc_package.rb +++ b/test/tc_package.rb @@ -268,7 +268,6 @@ 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 assert_equal(25, p.size) diff --git a/test/workbook/worksheet/auto_filter/tc_filter_column.rb b/test/workbook/worksheet/auto_filter/tc_filter_column.rb index 60b726a6..934931fd 100644 --- a/test/workbook/worksheet/auto_filter/tc_filter_column.rb +++ b/test/workbook/worksheet/auto_filter/tc_filter_column.rb @@ -6,7 +6,6 @@ class TestFilterColumn < Test::Unit::TestCase @filter_column = Axlsx::FilterColumn.new(0, :filters, :filter_items => [200]) end - def test_initialize_col_id assert_raise ArgumentError do Axlsx::FilterColumn.new(0, :bobs_house_of_filter) @@ -69,8 +68,6 @@ class TestFilterColumn < Test::Unit::TestCase assert doc.xpath("//filterColumn[@hiddenButton=#{@filter_column.hidden_button}]") assert doc.xpath("//filterColumn[@showButton=#{@filter_column.show_button}]") - - assert doc.xpath("//filterColumn/filters") end end diff --git a/test/workbook/worksheet/tc_border_creator.rb b/test/workbook/worksheet/tc_border_creator.rb index 0a72cc84..6a0f8424 100644 --- a/test/workbook/worksheet/tc_border_creator.rb +++ b/test/workbook/worksheet/tc_border_creator.rb @@ -66,7 +66,6 @@ class TestBorderCreator < Test::Unit::TestCase assert_equal [:thick], @ws.styles.borders[2].prs.map(&:style).uniq assert_equal [:left, :top], @ws.styles.borders[2].prs.map(&:name) - assert_equal 1, @ws.styles.borders[3].prs.size assert_equal ["FFFFFFFF"], @ws.styles.borders[3].prs.map(&:color).map(&:rgb).uniq assert_equal [:thick], @ws.styles.borders[3].prs.map(&:style).uniq diff --git a/test/workbook/worksheet/tc_break.rb b/test/workbook/worksheet/tc_break.rb index bf440b0b..814a4878 100644 --- a/test/workbook/worksheet/tc_break.rb +++ b/test/workbook/worksheet/tc_break.rb @@ -27,7 +27,6 @@ class TestBreak < Test::Unit::TestCase end end - def test_man assert_equal(true, @break.man) assert_raises ArgumentError do diff --git a/test/workbook/worksheet/tc_conditional_formatting.rb b/test/workbook/worksheet/tc_conditional_formatting.rb index bbf92e21..d7da55e0 100644 --- a/test/workbook/worksheet/tc_conditional_formatting.rb +++ b/test/workbook/worksheet/tc_conditional_formatting.rb @@ -59,7 +59,6 @@ class TestConditionalFormatting < Test::Unit::TestCase end - def test_add_as_hash color_scale = Axlsx::ColorScale.new do |cs| diff --git a/test/workbook/worksheet/tc_data_bar.rb b/test/workbook/worksheet/tc_data_bar.rb index 1c460630..fe02976d 100644 --- a/test/workbook/worksheet/tc_data_bar.rb +++ b/test/workbook/worksheet/tc_data_bar.rb @@ -17,7 +17,6 @@ class TestDataBar < Test::Unit::TestCase assert_equal("0", data_bar.value_objects.last.val) end - def test_minLength assert_raise(ArgumentError) { @data_bar.minLength = :invalid_type } assert_nothing_raised { @data_bar.minLength = 0} diff --git a/test/workbook/worksheet/tc_page_margins.rb b/test/workbook/worksheet/tc_page_margins.rb index 386f47da..96695846 100644 --- a/test/workbook/worksheet/tc_page_margins.rb +++ b/test/workbook/worksheet/tc_page_margins.rb @@ -27,7 +27,6 @@ class TestPageMargins < Test::Unit::TestCase assert_equal(0.1, optioned.footer) end - def test_set_all_values @pm.set(:left => 1.1, :right => 1.2, :top => 1.3, :bottom => 1.4, :header => 0.8, :footer => 0.9) assert_equal(1.1, @pm.left) diff --git a/test/workbook/worksheet/tc_page_setup.rb b/test/workbook/worksheet/tc_page_setup.rb index 097eb563..e12f93b5 100644 --- a/test/workbook/worksheet/tc_page_setup.rb +++ b/test/workbook/worksheet/tc_page_setup.rb @@ -138,6 +138,5 @@ class TestPageSetup < Test::Unit::TestCase assert_equal(fits, [2, 7]) assert_raise(ArgumentError) { puts @ps.fit_to(:width => true)} - end end diff --git a/test/workbook/worksheet/tc_pane.rb b/test/workbook/worksheet/tc_pane.rb index 13795668..c3998bd4 100644 --- a/test/workbook/worksheet/tc_pane.rb +++ b/test/workbook/worksheet/tc_pane.rb @@ -10,7 +10,6 @@ class TestPane < Test::Unit::TestCase @pane = Axlsx::Pane.new(@options) end - def test_active_pane assert_raise(ArgumentError) { @pane.active_pane = "10" } assert_nothing_raised { @pane.active_pane = :top_left } diff --git a/test/workbook/worksheet/tc_pivot_table.rb b/test/workbook/worksheet/tc_pivot_table.rb index f01440ad..b3ca647e 100644 --- a/test/workbook/worksheet/tc_pivot_table.rb +++ b/test/workbook/worksheet/tc_pivot_table.rb @@ -1,6 +1,5 @@ require 'tc_helper.rb' - def shared_test_pivot_table_xml_validity(pivot_table) schema = Nokogiri::XML::Schema(File.open(Axlsx::SML_XSD)) doc = Nokogiri::XML(pivot_table.to_xml_string) diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index 3d1a4d4d..e919b914 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -88,7 +88,6 @@ class TestRow < Test::Unit::TestCase assert_equal(15, @row.height) end - def test_ph assert_raise(ArgumentError) { @row.ph = -3 } assert_nothing_raised { @row.ph = true } diff --git a/test/workbook/worksheet/tc_sheet_pr.rb b/test/workbook/worksheet/tc_sheet_pr.rb index be45438b..e39c8bca 100644 --- a/test/workbook/worksheet/tc_sheet_pr.rb +++ b/test/workbook/worksheet/tc_sheet_pr.rb @@ -1,6 +1,5 @@ require 'tc_helper.rb' - class TestSheetPr < Test::Unit::TestCase def setup diff --git a/test/workbook/worksheet/tc_sheet_view.rb b/test/workbook/worksheet/tc_sheet_view.rb index 4481f127..386777b2 100644 --- a/test/workbook/worksheet/tc_sheet_view.rb +++ b/test/workbook/worksheet/tc_sheet_view.rb @@ -15,7 +15,6 @@ class TestSheetView < Test::Unit::TestCase @integer_options = { :color_id => 2, :workbook_view_id => 2 }.merge(@int_0).merge(@int_100) @string_options = { :top_left_cell => 'A2' } - @options = @boolean_options.merge(@boolean_options).merge(@symbol_options).merge(@nil_options).merge(@int_0).merge(@int_100) @sv = Axlsx::SheetView.new(@options) diff --git a/test/workbook/worksheet/tc_table_style_info.rb b/test/workbook/worksheet/tc_table_style_info.rb index f0c6821c..276f7aa4 100644 --- a/test/workbook/worksheet/tc_table_style_info.rb +++ b/test/workbook/worksheet/tc_table_style_info.rb @@ -14,7 +14,6 @@ class TestTableStyleInfo < Test::Unit::TestCase :show_column_stripes => 1, :name => "TableStyleDark4" } - end def test_initialize diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb index 5a1a870a..e914f320 100644 --- a/test/workbook/worksheet/tc_worksheet.rb +++ b/test/workbook/worksheet/tc_worksheet.rb @@ -7,7 +7,6 @@ class TestWorksheet < Test::Unit::TestCase @ws = @wb.add_worksheet end - def test_pn assert_equal(@ws.pn, "worksheets/sheet1.xml") ws = @ws.workbook.add_worksheet @@ -134,7 +133,6 @@ class TestWorksheet < Test::Unit::TestCase end - # def test_use_gridlines # assert_raise(ArgumentError) { @ws.show_gridlines = -1.1 } # assert_nothing_raised { @ws.show_gridlines = false } @@ -210,7 +208,6 @@ class TestWorksheet < Test::Unit::TestCase @ws.add_row [1, 2, 3, 4] @ws.add_row [1, 2, 3, 4] - assert(@ws.row_breaks.empty?) assert(@ws.col_breaks.empty?) @ws.add_page_break(@ws.rows.last.cells[1]) @@ -218,7 +215,6 @@ class TestWorksheet < Test::Unit::TestCase assert_equal(1, @ws.col_breaks.size) end - def test_drawing assert @ws.drawing == nil @ws.add_chart(Axlsx::Pie3DChart) @@ -589,7 +585,6 @@ class TestWorksheet < Test::Unit::TestCase assert_equal(other_ws.index, filter_database[1].local_sheet_id) end - def test_sheet_pr_for_auto_filter @ws.auto_filter.range = 'A1:D9' @ws.auto_filter.add_column 0, :filters, :filter_items => [1] |
