summaryrefslogtreecommitdiffhomepage
path: root/test/doc_props
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-05-15 11:23:59 +0900
committerRandy Morgan <[email protected]>2012-05-15 11:23:59 +0900
commit2d744ba77906d460b608859c945a5741ec725e42 (patch)
tree0366b619ea15909d230a2fa485a95d395486d6cf /test/doc_props
parent2e1e14dd8f91e8a1416faae9501fdf04638104c7 (diff)
downloadcaxlsx-2d744ba77906d460b608859c945a5741ec725e42.tar.gz
caxlsx-2d744ba77906d460b608859c945a5741ec725e42.zip
bring coverage up to 100% and patch a few minor bugs in cell style overrides and misnamed app attributes.
Diffstat (limited to 'test/doc_props')
-rw-r--r--test/doc_props/tc_app.rb32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/doc_props/tc_app.rb b/test/doc_props/tc_app.rb
index bff2bb3d..ec862c37 100644
--- a/test/doc_props/tc_app.rb
+++ b/test/doc_props/tc_app.rb
@@ -1,9 +1,39 @@
require 'tc_helper.rb'
class TestApp < Test::Unit::TestCase
+ def setup
+ options = {
+ :'Template' => 'Foo.xlt',
+ :'Manager' => 'Penny',
+ :'Company' => "Bob's Repair",
+ :'Pages' => 1,
+ :'Words' => 2,
+ :'Characters' => 7,
+ :'PresentationFormat' => 'any',
+ :'Lines' => 1,
+ :'Paragraphs' => 1,
+ :'Slides' => 4,
+ :'Notes' => 1,
+ :'TotalTime' => 2,
+ :'HidddenSlides' => 3,
+ :'MMClips' => 10,
+ :'ScaleCrop' => true,
+ :'LinksUpToDate' => true,
+ :'CharactersWithSpaces' => 9,
+ :'SharedDoc' => false,
+ :'HyperlinkBase' => 'foo',
+ :'HyperlInksChanged' => false,
+ :'Application' => 'axlsx',
+ :'AppVersion' => '1.1.5',
+ :'DocSecurity' => 0
+ }
+
+ @app = Axlsx::App.new options
+
+ end
def test_valid_document
schema = Nokogiri::XML::Schema(File.open(Axlsx::APP_XSD))
- doc = Nokogiri::XML(Axlsx::App.new.to_xml_string)
+ doc = Nokogiri::XML(@app.to_xml_string)
errors = []
schema.validate(doc).each do |error|
errors << error