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/rels/tc_relationship.rb | |
| parent | 6752225bbb8a9eec905ec02a98f1a25a309c404a (diff) | |
| download | caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.tar.gz caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.zip | |
Use Ruby 1.9 hash syntax (non-production code)
Diffstat (limited to 'test/rels/tc_relationship.rb')
| -rw-r--r-- | test/rels/tc_relationship.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/rels/tc_relationship.rb b/test/rels/tc_relationship.rb index 04dab810..9efe3909 100644 --- a/test/rels/tc_relationship.rb +++ b/test/rels/tc_relationship.rb @@ -33,8 +33,8 @@ class TestRelationships < Test::Unit::TestCase assert_equal rel_1.Id, rel_2.Id - rel_3 = Axlsx::Relationship.new(source_obj, Axlsx::HYPERLINK_R, 'target', :target_mode => :External) - rel_4 = Axlsx::Relationship.new(source_obj, Axlsx::HYPERLINK_R, '../target', :target_mode => :External) + rel_3 = Axlsx::Relationship.new(source_obj, Axlsx::HYPERLINK_R, 'target', target_mode: :External) + rel_4 = Axlsx::Relationship.new(source_obj, Axlsx::HYPERLINK_R, '../target', target_mode: :External) assert_not_equal rel_3.Id, rel_4.Id end @@ -46,12 +46,12 @@ class TestRelationships < Test::Unit::TestCase end def test_target_mode - assert_raise(ArgumentError) { Axlsx::Relationship.new nil, 'type', 'target', :target_mode => "FISH" } - assert_nothing_raised { Axlsx::Relationship.new(nil, Axlsx::WORKSHEET_R, 'target', :target_mode => :External) } + assert_raise(ArgumentError) { Axlsx::Relationship.new nil, 'type', 'target', target_mode: "FISH" } + assert_nothing_raised { Axlsx::Relationship.new(nil, Axlsx::WORKSHEET_R, 'target', target_mode: :External) } end def test_ampersand_escaping_in_target - r = Axlsx::Relationship.new(nil, Axlsx::HYPERLINK_R, "http://example.com?foo=1&bar=2", :target_mod => :External) + r = Axlsx::Relationship.new(nil, Axlsx::HYPERLINK_R, "http://example.com?foo=1&bar=2", target_mod: :External) doc = Nokogiri::XML(r.to_xml_string) assert_equal(1, doc.xpath("//Relationship[@Target='http://example.com?foo=1&bar=2']").size) |
