summaryrefslogtreecommitdiffhomepage
path: root/test/stylesheet/tc_xf.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-03-23 23:52:34 +0900
committerRandy Morgan <[email protected]>2012-03-23 23:52:34 +0900
commitad7119b5927584e4fc735ce72ea69322c3e9acac (patch)
treeb9ac11d22433f133bb1644b8c26bdd4a0886c555 /test/stylesheet/tc_xf.rb
parentcd6fb747bbf2915f92f1fb0169e7f54d87aa1915 (diff)
downloadcaxlsx-ad7119b5927584e4fc735ce72ea69322c3e9acac.tar.gz
caxlsx-ad7119b5927584e4fc735ce72ea69322c3e9acac.zip
move requires out of specs and into helper that prepends lib directory for requires
Diffstat (limited to 'test/stylesheet/tc_xf.rb')
-rw-r--r--test/stylesheet/tc_xf.rb33
1 files changed, 16 insertions, 17 deletions
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)