summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_cfvo.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/workbook/worksheet/tc_cfvo.rb')
-rw-r--r--test/workbook/worksheet/tc_cfvo.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/workbook/worksheet/tc_cfvo.rb b/test/workbook/worksheet/tc_cfvo.rb
index 71ba6bbc..6098add1 100644
--- a/test/workbook/worksheet/tc_cfvo.rb
+++ b/test/workbook/worksheet/tc_cfvo.rb
@@ -1,4 +1,4 @@
-require 'tc_helper.rb'
+require 'tc_helper'
class TestCfvo < Test::Unit::TestCase
def setup
@@ -7,24 +7,25 @@ class TestCfvo < Test::Unit::TestCase
def test_val
assert_nothing_raised { @cfvo.val = "abc" }
- assert_equal(@cfvo.val, "abc")
+ assert_equal("abc", @cfvo.val)
end
def test_type
assert_raise(ArgumentError) { @cfvo.type = :invalid_type }
assert_nothing_raised { @cfvo.type = :max }
- assert_equal(@cfvo.type, :max)
+ assert_equal(:max, @cfvo.type)
end
def test_gte
assert_raise(ArgumentError) { @cfvo.gte = :bob }
- assert_equal(@cfvo.gte, true)
+ assert(@cfvo.gte)
assert_nothing_raised { @cfvo.gte = false }
- assert_equal(@cfvo.gte, false)
+ refute(@cfvo.gte)
end
def test_to_xml_string
doc = Nokogiri::XML.parse(@cfvo.to_xml_string)
+
assert doc.xpath(".//cfvo[@type='min'][@val=0][@gte=true]")
end
end