From 90401b4e3d1ce641646498dd72c20ecbc205bb63 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Tue, 8 May 2012 10:17:16 +0900 Subject: time is on my side --- test/doc_props/tc_core.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/doc_props/tc_core.rb b/test/doc_props/tc_core.rb index e26d1236..91522a33 100644 --- a/test/doc_props/tc_core.rb +++ b/test/doc_props/tc_core.rb @@ -4,6 +4,8 @@ class TestCore < Test::Unit::TestCase def setup @core = Axlsx::Core.new + # could still see some false positives if the second changes between the next two calls + @time = Time.now.strftime('%Y-%m-%dT%H:%M:%S') @doc = Nokogiri::XML(@core.to_xml_string) end @@ -18,7 +20,7 @@ class TestCore < Test::Unit::TestCase end def test_populates_created - assert_equal(@doc.xpath('//dcterms:created').text, Time.now.strftime('%Y-%m-%dT%H:%M:%S'), "dcterms:created incorrect") + assert_equal(@doc.xpath('//dcterms:created').text, @time, "dcterms:created incorrect") end def test_populates_default_name -- cgit v1.2.3