summaryrefslogtreecommitdiffhomepage
path: root/test/content_type
diff options
context:
space:
mode:
Diffstat (limited to 'test/content_type')
-rw-r--r--test/content_type/tc_content_type.rb4
-rw-r--r--test/content_type/tc_default.rb4
-rw-r--r--test/content_type/tc_override.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/content_type/tc_content_type.rb b/test/content_type/tc_content_type.rb
index 278cd67b..f06554c8 100644
--- a/test/content_type/tc_content_type.rb
+++ b/test/content_type/tc_content_type.rb
@@ -8,7 +8,7 @@ class TestContentType < Test::Unit::TestCase
def test_valid_document
schema = Nokogiri::XML::Schema(File.open(Axlsx::CONTENT_TYPES_XSD))
- assert(schema.validate(@doc).map{ |e| puts e.message; e.message }.empty?)
+ assert(schema.validate(@doc).map { |e| puts e.message; e.message }.empty?)
end
def test_pre_built_types
@@ -22,7 +22,7 @@ class TestContentType < Test::Unit::TestCase
assert_equal(node["Extension"], "#{Axlsx::XML_EX}", "xml content type invalid")
node = @doc.xpath(d_path % Axlsx::RELS_CT).first
- assert_equal(node["Extension"],"#{Axlsx::RELS_EX}", "relationships content type invalid")
+ assert_equal(node["Extension"], "#{Axlsx::RELS_EX}", "relationships content type invalid")
#overrride
assert_equal(@doc.xpath("//xmlns:Override").size, 4, "There should be 4 Override types")
diff --git a/test/content_type/tc_default.rb b/test/content_type/tc_default.rb
index 77915ea0..096a117a 100644
--- a/test/content_type/tc_default.rb
+++ b/test/content_type/tc_default.rb
@@ -2,11 +2,11 @@ require 'tc_helper.rb'
class TestDefault < Test::Unit::TestCase
def test_content_type_restriction
- assert_raise(ArgumentError, "raises argument error if invlalid ContentType is") { Axlsx::Default.new :ContentType=>"asdf" }
+ assert_raise(ArgumentError, "raises argument error if invlalid ContentType is") { Axlsx::Default.new :ContentType => "asdf" }
end
def test_to_xml_string
- type = Axlsx::Default.new :Extension=>"xml", :ContentType=>Axlsx::XML_CT
+ type = Axlsx::Default.new :Extension => "xml", :ContentType => Axlsx::XML_CT
doc = Nokogiri::XML(type.to_xml_string)
assert_equal(doc.xpath("Default[@ContentType='#{Axlsx::XML_CT}']").size, 1)
assert_equal(doc.xpath("Default[@Extension='xml']").size, 1)
diff --git a/test/content_type/tc_override.rb b/test/content_type/tc_override.rb
index c21f9f27..952f40d8 100644
--- a/test/content_type/tc_override.rb
+++ b/test/content_type/tc_override.rb
@@ -1,11 +1,11 @@
require 'tc_helper.rb'
class TestOverride < Test::Unit::TestCase
def test_content_type_restriction
- assert_raise(ArgumentError, "requires known content type") { Axlsx::Override.new :ContentType=>"asdf" }
+ assert_raise(ArgumentError, "requires known content type") { Axlsx::Override.new :ContentType => "asdf" }
end
def test_to_xml
- type = Axlsx::Override.new :PartName=>"somechart.xml", :ContentType=>Axlsx::CHART_CT
+ type = Axlsx::Override.new :PartName => "somechart.xml", :ContentType => Axlsx::CHART_CT
doc = Nokogiri::XML(type.to_xml_string)
assert_equal(doc.xpath("Override[@ContentType='#{Axlsx::CHART_CT}']").size, 1)
assert_equal(doc.xpath("Override[@PartName='somechart.xml']").size, 1)