summaryrefslogtreecommitdiffhomepage
path: root/test/stylesheet
diff options
context:
space:
mode:
Diffstat (limited to 'test/stylesheet')
-rw-r--r--test/stylesheet/tc_border.rb7
-rw-r--r--test/stylesheet/tc_border_pr.rb7
-rw-r--r--test/stylesheet/tc_cell_alignment.rb9
-rw-r--r--test/stylesheet/tc_cell_protection.rb5
-rw-r--r--test/stylesheet/tc_cell_style.rb5
-rw-r--r--test/stylesheet/tc_color.rb5
-rw-r--r--test/stylesheet/tc_fill.rb3
-rw-r--r--test/stylesheet/tc_font.rb11
-rw-r--r--test/stylesheet/tc_gradient_fill.rb3
-rw-r--r--test/stylesheet/tc_gradient_stop.rb3
-rw-r--r--test/stylesheet/tc_num_fmt.rb3
-rw-r--r--test/stylesheet/tc_pattern_fill.rb7
-rw-r--r--test/stylesheet/tc_styles.rb3
-rw-r--r--test/stylesheet/tc_table_style.rb5
-rw-r--r--test/stylesheet/tc_table_style_element.rb5
-rw-r--r--test/stylesheet/tc_table_styles.rb7
-rw-r--r--test/stylesheet/tc_xf.rb33
17 files changed, 52 insertions, 69 deletions
diff --git a/test/stylesheet/tc_border.rb b/test/stylesheet/tc_border.rb
index ba268e07..ae191dd0 100644
--- a/test/stylesheet/tc_border.rb
+++ b/test/stylesheet/tc_border.rb
@@ -1,8 +1,7 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestBorder < Test::Unit::TestCase
- def setup
+ def setup
@b = Axlsx::Border.new
end
def teardown
@@ -10,7 +9,7 @@ class TestBorder < Test::Unit::TestCase
def test_initialiation
assert_equal(@b.diagonalUp, nil)
assert_equal(@b.diagonalDown, nil)
- assert_equal(@b.outline, nil)
+ assert_equal(@b.outline, nil)
assert(@b.prs.is_a?(Axlsx::SimpleTypedList))
end
diff --git a/test/stylesheet/tc_border_pr.rb b/test/stylesheet/tc_border_pr.rb
index 18388186..dc0fa9da 100644
--- a/test/stylesheet/tc_border_pr.rb
+++ b/test/stylesheet/tc_border_pr.rb
@@ -1,8 +1,7 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestBorderPr < Test::Unit::TestCase
- def setup
+ def setup
@bpr = Axlsx::BorderPr.new
end
def teardown
@@ -10,7 +9,7 @@ class TestBorderPr < Test::Unit::TestCase
def test_initialiation
assert_equal(@bpr.color, nil)
assert_equal(@bpr.style, nil)
- assert_equal(@bpr.name, nil)
+ assert_equal(@bpr.name, nil)
end
def test_color
diff --git a/test/stylesheet/tc_cell_alignment.rb b/test/stylesheet/tc_cell_alignment.rb
index 66f95518..6b8cd5cd 100644
--- a/test/stylesheet/tc_cell_alignment.rb
+++ b/test/stylesheet/tc_cell_alignment.rb
@@ -1,8 +1,7 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestCellAlignment < Test::Unit::TestCase
- def setup
+ def setup
@item = Axlsx::CellAlignment.new
end
@@ -16,8 +15,8 @@ class TestCellAlignment < Test::Unit::TestCase
assert_equal(@item.justifyLastLine, nil)
assert_equal(@item.shrinkToFit, nil)
assert_equal(@item.readingOrder, nil)
- options = { :horizontal => :left, :vertical => :top, :textRotation => 3,
- :wrapText => true, :indent => 2, :relativeIndent => 5,
+ options = { :horizontal => :left, :vertical => :top, :textRotation => 3,
+ :wrapText => true, :indent => 2, :relativeIndent => 5,
:justifyLastLine => true, :shrinkToFit => true, :readingOrder => 2 }
ca = Axlsx::CellAlignment.new options
options.each do |key, value|
diff --git a/test/stylesheet/tc_cell_protection.rb b/test/stylesheet/tc_cell_protection.rb
index 665ec761..b2161fa6 100644
--- a/test/stylesheet/tc_cell_protection.rb
+++ b/test/stylesheet/tc_cell_protection.rb
@@ -1,9 +1,8 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestCellProtection < Test::Unit::TestCase
- def setup
+ def setup
@item = Axlsx::CellProtection.new
end
diff --git a/test/stylesheet/tc_cell_style.rb b/test/stylesheet/tc_cell_style.rb
index 878c7aab..8700d8c3 100644
--- a/test/stylesheet/tc_cell_style.rb
+++ b/test/stylesheet/tc_cell_style.rb
@@ -1,9 +1,8 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestCellStyle < Test::Unit::TestCase
- def setup
+ def setup
@item = Axlsx::CellStyle.new
end
diff --git a/test/stylesheet/tc_color.rb b/test/stylesheet/tc_color.rb
index 55f69448..affa2227 100644
--- a/test/stylesheet/tc_color.rb
+++ b/test/stylesheet/tc_color.rb
@@ -1,9 +1,8 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestColor < Test::Unit::TestCase
- def setup
+ def setup
@item = Axlsx::Color.new
end
diff --git a/test/stylesheet/tc_fill.rb b/test/stylesheet/tc_fill.rb
index 090a395b..9aadef29 100644
--- a/test/stylesheet/tc_fill.rb
+++ b/test/stylesheet/tc_fill.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestFill < Test::Unit::TestCase
diff --git a/test/stylesheet/tc_font.rb b/test/stylesheet/tc_font.rb
index 141c285e..7b3da25a 100644
--- a/test/stylesheet/tc_font.rb
+++ b/test/stylesheet/tc_font.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestFont < Test::Unit::TestCase
@@ -29,7 +28,7 @@ class TestFont < Test::Unit::TestCase
- # def name=(v) Axlsx::validate_string v; @name = v end
+ # def name=(v) Axlsx::validate_string v; @name = v end
def test_name
assert_raise(ArgumentError) { @item.name = 7 }
assert_nothing_raised { @item.name = "bob" }
@@ -49,7 +48,7 @@ class TestFont < Test::Unit::TestCase
assert_equal(@item.family, 5)
end
- # def b=(v) Axlsx::validate_boolean v; @b = v end
+ # def b=(v) Axlsx::validate_boolean v; @b = v end
def test_b
assert_raise(ArgumentError) { @item.b = -7 }
assert_nothing_raised { @item.b = true }
@@ -62,7 +61,7 @@ class TestFont < Test::Unit::TestCase
assert_nothing_raised { @item.i = true }
assert_equal(@item.i, true)
end
-
+
# def u=(v) Axlsx::validate_boolean v; @u = v end
def test_u
assert_raise(ArgumentError) { @item.u = -7 }
@@ -84,7 +83,7 @@ class TestFont < Test::Unit::TestCase
assert_equal(@item.outline, true)
end
- # def shadow=(v) Axlsx::validate_boolean v; @shadow = v end
+ # def shadow=(v) Axlsx::validate_boolean v; @shadow = v end
def test_shadow
assert_raise(ArgumentError) { @item.shadow = -7 }
assert_nothing_raised { @item.shadow = true }
diff --git a/test/stylesheet/tc_gradient_fill.rb b/test/stylesheet/tc_gradient_fill.rb
index f5c87771..c252a498 100644
--- a/test/stylesheet/tc_gradient_fill.rb
+++ b/test/stylesheet/tc_gradient_fill.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestGradientFill < Test::Unit::TestCase
diff --git a/test/stylesheet/tc_gradient_stop.rb b/test/stylesheet/tc_gradient_stop.rb
index d7735231..f1cf5183 100644
--- a/test/stylesheet/tc_gradient_stop.rb
+++ b/test/stylesheet/tc_gradient_stop.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestGradientStop < Test::Unit::TestCase
diff --git a/test/stylesheet/tc_num_fmt.rb b/test/stylesheet/tc_num_fmt.rb
index 281773ce..b5b73929 100644
--- a/test/stylesheet/tc_num_fmt.rb
+++ b/test/stylesheet/tc_num_fmt.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestNumFmt < Test::Unit::TestCase
diff --git a/test/stylesheet/tc_pattern_fill.rb b/test/stylesheet/tc_pattern_fill.rb
index a9b6a113..65ed0dd1 100644
--- a/test/stylesheet/tc_pattern_fill.rb
+++ b/test/stylesheet/tc_pattern_fill.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestPatternFill < Test::Unit::TestCase
@@ -17,13 +16,13 @@ class TestPatternFill < Test::Unit::TestCase
assert_equal(@item.fgColor, nil)
end
- def test_bgColor
+ def test_bgColor
assert_raise(ArgumentError) { @item.bgColor = -1.1 }
assert_nothing_raised { @item.bgColor = Axlsx::Color.new }
assert_equal(@item.bgColor.rgb, "FF000000")
end
- def test_fgColor
+ def test_fgColor
assert_raise(ArgumentError) { @item.fgColor = -1.1 }
assert_nothing_raised { @item.fgColor = Axlsx::Color.new }
assert_equal(@item.fgColor.rgb, "FF000000")
diff --git a/test/stylesheet/tc_styles.rb b/test/stylesheet/tc_styles.rb
index 61a87bf7..9db37157 100644
--- a/test/stylesheet/tc_styles.rb
+++ b/test/stylesheet/tc_styles.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestStyles < Test::Unit::TestCase
def setup
diff --git a/test/stylesheet/tc_table_style.rb b/test/stylesheet/tc_table_style.rb
index 54bebb5b..8b219a93 100644
--- a/test/stylesheet/tc_table_style.rb
+++ b/test/stylesheet/tc_table_style.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestTableStyle < Test::Unit::TestCase
@@ -16,7 +15,7 @@ class TestTableStyle < Test::Unit::TestCase
assert_equal(@item.table, nil)
end
- def test_name
+ def test_name
assert_raise(ArgumentError) { @item.name = -1.1 }
assert_nothing_raised { @item.name = "lovely table style" }
assert_equal(@item.name, "lovely table style")
diff --git a/test/stylesheet/tc_table_style_element.rb b/test/stylesheet/tc_table_style_element.rb
index 9cfa5204..2e6e763f 100644
--- a/test/stylesheet/tc_table_style_element.rb
+++ b/test/stylesheet/tc_table_style_element.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestTableStyleElement < Test::Unit::TestCase
@@ -16,7 +15,7 @@ class TestTableStyleElement < Test::Unit::TestCase
assert_equal(@item.dxfId, nil)
end
- def test_type
+ def test_type
assert_raise(ArgumentError) { @item.type = -1.1 }
assert_nothing_raised { @item.type = :blankRow }
assert_equal(@item.type, :blankRow)
diff --git a/test/stylesheet/tc_table_styles.rb b/test/stylesheet/tc_table_styles.rb
index 825a18d8..cc8da9d5 100644
--- a/test/stylesheet/tc_table_styles.rb
+++ b/test/stylesheet/tc_table_styles.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestTableStyles < Test::Unit::TestCase
@@ -15,13 +14,13 @@ class TestTableStyles < Test::Unit::TestCase
assert_equal(@item.defaultPivotStyle, "PivotStyleLight16")
end
- def test_defaultTableStyle
+ def test_defaultTableStyle
assert_raise(ArgumentError) { @item.defaultTableStyle = -1.1 }
assert_nothing_raised { @item.defaultTableStyle = "anyones guess" }
assert_equal(@item.defaultTableStyle, "anyones guess")
end
- def test_defaultPivotStyle
+ def test_defaultPivotStyle
assert_raise(ArgumentError) { @item.defaultPivotStyle = -1.1 }
assert_nothing_raised { @item.defaultPivotStyle = "anyones guess" }
assert_equal(@item.defaultPivotStyle, "anyones guess")
diff --git a/test/stylesheet/tc_xf.rb b/test/stylesheet/tc_xf.rb
index 9ca53562..fdaef970 100644
--- a/test/stylesheet/tc_xf.rb
+++ b/test/stylesheet/tc_xf.rb
@@ -1,5 +1,4 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestXf < Test::Unit::TestCase
@@ -28,91 +27,91 @@ class TestXf < Test::Unit::TestCase
assert_equal(@item.applyProtection, nil)
end
- def test_alignment
+ def test_alignment
assert_raise(ArgumentError) { @item.alignment = -1.1 }
assert_nothing_raised { @item.alignment = Axlsx::CellAlignment.new }
assert(@item.alignment.is_a?(Axlsx::CellAlignment))
end
- def test_protection
+ def test_protection
assert_raise(ArgumentError) { @item.protection = -1.1 }
assert_nothing_raised { @item.protection = Axlsx::CellProtection.new }
assert(@item.protection.is_a?(Axlsx::CellProtection))
end
- def test_numFmtId
+ def test_numFmtId
assert_raise(ArgumentError) { @item.numFmtId = -1.1 }
assert_nothing_raised { @item.numFmtId = 0 }
assert_equal(@item.numFmtId, 0)
end
- def test_fillId
+ def test_fillId
assert_raise(ArgumentError) { @item.fillId = -1.1 }
assert_nothing_raised { @item.fillId = 0 }
assert_equal(@item.fillId, 0)
end
- def test_fontId
+ def test_fontId
assert_raise(ArgumentError) { @item.fontId = -1.1 }
assert_nothing_raised { @item.fontId = 0 }
assert_equal(@item.fontId, 0)
end
- def test_borderId
+ def test_borderId
assert_raise(ArgumentError) { @item.borderId = -1.1 }
assert_nothing_raised { @item.borderId = 0 }
assert_equal(@item.borderId, 0)
end
- def test_xfId
+ def test_xfId
assert_raise(ArgumentError) { @item.xfId = -1.1 }
assert_nothing_raised { @item.xfId = 0 }
assert_equal(@item.xfId, 0)
end
- def test_quotePrefix
+ def test_quotePrefix
assert_raise(ArgumentError) { @item.quotePrefix = -1.1 }
assert_nothing_raised { @item.quotePrefix = false }
assert_equal(@item.quotePrefix, false)
end
- def test_pivotButton
+ def test_pivotButton
assert_raise(ArgumentError) { @item.pivotButton = -1.1 }
assert_nothing_raised { @item.pivotButton = false }
assert_equal(@item.pivotButton, false)
end
- def test_applyNumberFormat
+ def test_applyNumberFormat
assert_raise(ArgumentError) { @item.applyNumberFormat = -1.1 }
assert_nothing_raised { @item.applyNumberFormat = false }
assert_equal(@item.applyNumberFormat, false)
end
- def test_applyFont
+ def test_applyFont
assert_raise(ArgumentError) { @item.applyFont = -1.1 }
assert_nothing_raised { @item.applyFont = false }
assert_equal(@item.applyFont, false)
end
- def test_applyFill
+ def test_applyFill
assert_raise(ArgumentError) { @item.applyFill = -1.1 }
assert_nothing_raised { @item.applyFill = false }
assert_equal(@item.applyFill, false)
end
- def test_applyBorder
+ def test_applyBorder
assert_raise(ArgumentError) { @item.applyBorder = -1.1 }
assert_nothing_raised { @item.applyBorder = false }
assert_equal(@item.applyBorder, false)
end
- def test_applyAlignment
+ def test_applyAlignment
assert_raise(ArgumentError) { @item.applyAlignment = -1.1 }
assert_nothing_raised { @item.applyAlignment = false }
assert_equal(@item.applyAlignment, false)
end
- def test_applyProtection
+ def test_applyProtection
assert_raise(ArgumentError) { @item.applyProtection = -1.1 }
assert_nothing_raised { @item.applyProtection = false }
assert_equal(@item.applyProtection, false)