diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-22 20:13:13 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-22 20:13:13 +0200 |
| commit | 083c4c6d62011cd88966d608b0c6bb736f300a0c (patch) | |
| tree | b5ceb9b3a32c4130d84c3075966b4033bf32a118 /test/content_type | |
| parent | 6752225bbb8a9eec905ec02a98f1a25a309c404a (diff) | |
| download | caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.tar.gz caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.zip | |
Use Ruby 1.9 hash syntax (non-production code)
Diffstat (limited to 'test/content_type')
| -rw-r--r-- | test/content_type/tc_default.rb | 4 | ||||
| -rw-r--r-- | test/content_type/tc_override.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/content_type/tc_default.rb b/test/content_type/tc_default.rb index 89125bf1..d9ae1dd3 100644 --- a/test/content_type/tc_default.rb +++ b/test/content_type/tc_default.rb @@ -4,11 +4,11 @@ require 'tc_helper' 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(1, doc.xpath("Default[@ContentType='#{Axlsx::XML_CT}']").size) diff --git a/test/content_type/tc_override.rb b/test/content_type/tc_override.rb index 73a13410..c9cf3c4c 100644 --- a/test/content_type/tc_override.rb +++ b/test/content_type/tc_override.rb @@ -4,11 +4,11 @@ require 'tc_helper' 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(1, doc.xpath("Override[@ContentType='#{Axlsx::CHART_CT}']").size) |
