summaryrefslogtreecommitdiffhomepage
path: root/test/doc_props/tc_core.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/doc_props/tc_core.rb')
-rw-r--r--test/doc_props/tc_core.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/doc_props/tc_core.rb b/test/doc_props/tc_core.rb
index d5412a4f..6aafca3e 100644
--- a/test/doc_props/tc_core.rb
+++ b/test/doc_props/tc_core.rb
@@ -15,7 +15,8 @@ class TestCore < Test::Unit::TestCase
puts error.message
errors << error
end
- assert_equal(errors.size, 0, "core.xml Invalid" + errors.map(&:message).to_s)
+
+ assert_equal(0, errors.size, "core.xml Invalid" + errors.map(&:message).to_s)
end
def test_populates_created
@@ -26,16 +27,18 @@ class TestCore < Test::Unit::TestCase
time = Time.utc(2013, 1, 1, 12, 0)
c = Axlsx::Core.new :created => time
doc = Nokogiri::XML(c.to_xml_string)
+
assert_equal(doc.xpath('//dcterms:created').text, time.xmlschema, "dcterms:created incorrect")
end
def test_populates_default_name
- assert_equal(@doc.xpath('//dc:creator').text, "axlsx", "Default name not populated")
+ assert_equal("axlsx", @doc.xpath('//dc:creator').text, "Default name not populated")
end
def test_creator_as_option
c = Axlsx::Core.new :creator => "some guy"
doc = Nokogiri::XML(c.to_xml_string)
- assert(doc.xpath('//dc:creator').text == "some guy")
+
+ assert_equal("some guy", doc.xpath('//dc:creator').text)
end
end