summaryrefslogtreecommitdiffhomepage
path: root/test/doc_props
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-04-01 00:35:26 +0900
committerRandy Morgan <[email protected]>2012-04-01 00:35:26 +0900
commit22a341841f191a5aa00e87b1f166b4f25cc67f0a (patch)
tree505f46708d5cac7d33d0dd6679c125e2eb819075 /test/doc_props
parentbb2117ba17297e02a0fc6d5ad5a22462e72a9a79 (diff)
downloadcaxlsx-22a341841f191a5aa00e87b1f166b4f25cc67f0a.tar.gz
caxlsx-22a341841f191a5aa00e87b1f166b4f25cc67f0a.zip
part way through changing all serialization to use string concatenation prior to dropping Nokogiri dep in production.
Diffstat (limited to 'test/doc_props')
-rw-r--r--test/doc_props/tc_app.rb7
-rw-r--r--test/doc_props/tc_core.rb4
2 files changed, 3 insertions, 8 deletions
diff --git a/test/doc_props/tc_app.rb b/test/doc_props/tc_app.rb
index 31c87c41..bff2bb3d 100644
--- a/test/doc_props/tc_app.rb
+++ b/test/doc_props/tc_app.rb
@@ -1,14 +1,9 @@
require 'tc_helper.rb'
class TestApp < Test::Unit::TestCase
- def setup
- end
- def teardown
- end
-
def test_valid_document
schema = Nokogiri::XML::Schema(File.open(Axlsx::APP_XSD))
- doc = Nokogiri::XML(Axlsx::App.new.to_xml)
+ doc = Nokogiri::XML(Axlsx::App.new.to_xml_string)
errors = []
schema.validate(doc).each do |error|
errors << error
diff --git a/test/doc_props/tc_core.rb b/test/doc_props/tc_core.rb
index 5e75d812..e26d1236 100644
--- a/test/doc_props/tc_core.rb
+++ b/test/doc_props/tc_core.rb
@@ -4,7 +4,7 @@ class TestCore < Test::Unit::TestCase
def setup
@core = Axlsx::Core.new
- @doc = Nokogiri::XML(@core.to_xml)
+ @doc = Nokogiri::XML(@core.to_xml_string)
end
def test_valid_document
@@ -27,7 +27,7 @@ class TestCore < Test::Unit::TestCase
def test_creator_as_option
c = Axlsx::Core.new :creator => "some guy"
- doc = Nokogiri::XML(c.to_xml)
+ doc = Nokogiri::XML(c.to_xml_string)
assert(doc.xpath('//dc:creator').text == "some guy")
end
end