summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authortakkanm <[email protected]>2016-11-12 09:20:49 +0900
committertakkanm <[email protected]>2016-11-12 09:22:10 +0900
commit12d64338491b4d924911cd66b9e2c85dd56af358 (patch)
treec74d024e0d23e274725a2ef965de3468e823a268 /test
parent731639b7d8871e79e96167b64c83f55e06bf78f6 (diff)
downloadcaxlsx-12d64338491b4d924911cd66b9e2c85dd56af358.tar.gz
caxlsx-12d64338491b4d924911cd66b9e2c85dd56af358.zip
fix warning: constant ::Fixnum is deprecated
fix Fixnum deprecated warning on Ruby2.4-preview3. Fixnum was unify into Integer. https://bugs.ruby-lang.org/issues/12005
Diffstat (limited to 'test')
-rw-r--r--test/stylesheet/tc_styles.rb4
-rw-r--r--test/util/tc_simple_typed_list.rb2
-rw-r--r--test/workbook/worksheet/tc_worksheet.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb
index 98c8e3ef..eb1680ad 100644
--- a/test/stylesheet/tc_styles.rb
+++ b/test/stylesheet/tc_styles.rb
@@ -133,7 +133,7 @@ class TestStyles < Test::Unit::TestCase
:font_name => "woot font"
}
assert_equal(@styles.parse_font_options {}, nil, "noop if no font keys are set")
- assert_equal(@styles.parse_font_options(:b=>1).class, Fixnum, "return index of font if not :dxf type")
+ assert(@styles.parse_font_options(:b=>1).is_a?(Integer), "return index of font if not :dxf type")
assert_equal(@styles.parse_font_options(:b=>1, :type => :dxf).class, Axlsx::Font, "return font object if :dxf type")
f = @styles.parse_font_options(options.merge(:type => :dxf))
@@ -147,7 +147,7 @@ class TestStyles < Test::Unit::TestCase
def test_parse_fill_options
assert_equal(@styles.parse_fill_options {}, nil, "noop if no fill keys are set")
- assert_equal(@styles.parse_fill_options(:bg_color => "DE").class, Fixnum, "return index of fill if not :dxf type")
+ assert(@styles.parse_fill_options(:bg_color => "DE").is_a?(Integer), "return index of fill if not :dxf type")
assert_equal(@styles.parse_fill_options(:bg_color => "DE", :type => :dxf).class, Axlsx::Fill, "return fill object if :dxf type")
f = @styles.parse_fill_options(:bg_color => "DE", :type => :dxf)
assert(f.fill_type.bgColor.rgb == "FFDEDEDE")
diff --git a/test/util/tc_simple_typed_list.rb b/test/util/tc_simple_typed_list.rb
index 1596ac13..72bd6246 100644
--- a/test/util/tc_simple_typed_list.rb
+++ b/test/util/tc_simple_typed_list.rb
@@ -1,7 +1,7 @@
require 'tc_helper.rb'
class TestSimpleTypedList < Test::Unit::TestCase
def setup
- @list = Axlsx::SimpleTypedList.new Fixnum
+ @list = Axlsx::SimpleTypedList.new Integer
end
def teardown
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb
index df9da22f..166850e5 100644
--- a/test/workbook/worksheet/tc_worksheet.rb
+++ b/test/workbook/worksheet/tc_worksheet.rb
@@ -483,7 +483,7 @@ class TestWorksheet < Test::Unit::TestCase
@ws.column_widths nil, 0.5
assert_equal(@ws.column_info[1].width, 0.5, 'eat my width')
assert_raise(ArgumentError, 'only accept unsigned ints') { @ws.column_widths 2, 7, -1 }
- assert_raise(ArgumentError, 'only accept Integer, Float or Fixnum') { @ws.column_widths 2, 7, "-1" }
+ assert_raise(ArgumentError, 'only accept Integer or Float') { @ws.column_widths 2, 7, "-1" }
end
def test_protect_range