summaryrefslogtreecommitdiffhomepage
path: root/test/doc_props
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-05-08 10:17:16 +0900
committerRandy Morgan <[email protected]>2012-05-08 10:17:16 +0900
commit90401b4e3d1ce641646498dd72c20ecbc205bb63 (patch)
treea1d224fa5cca0eae083be88cf40331f51878a004 /test/doc_props
parentf12d21414f6272903ff274ec1a3add358bde30fb (diff)
downloadcaxlsx-90401b4e3d1ce641646498dd72c20ecbc205bb63.tar.gz
caxlsx-90401b4e3d1ce641646498dd72c20ecbc205bb63.zip
time is on my side
Diffstat (limited to 'test/doc_props')
-rw-r--r--test/doc_props/tc_core.rb4
1 files changed, 3 insertions, 1 deletions
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