summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYen-Nan Lin <yennanlin.tw@gmail.com>2017-08-01 10:36:44 +0800
committerYen-Nan Lin <yennanlin.tw@gmail.com>2017-08-01 10:36:44 +0800
commit0a44713c1d6575aa4d6021349a4a3f277a3038da (patch)
tree1087f1d4ac592b407d573220decd67e5c2a20e44 /test
parent781f8ae13221660a83f885b2264952cd4fbc6889 (diff)
downloadplist-0a44713c1d6575aa4d6021349a4a3f277a3038da.tar.gz
Use options hash instead of keyword arguments to support Ruby 1.8 & 1.9
Diffstat (limited to 'test')
-rw-r--r--test/test_generator.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_generator.rb b/test/test_generator.rb
index 71974dd..c93073b 100644
--- a/test/test_generator.rb
+++ b/test/test_generator.rb
@@ -72,10 +72,10 @@ class TestGenerator < Test::Unit::TestCase
end
def test_custom_indent
- hsh = { key1: 1, 'key2' => 2 }
- output_plist_node = Plist::Emit.plist_node(hsh, indent: nil)
- output_plist_dump_with_envelope = Plist::Emit.dump(hsh, indent: nil)
- output_plist_dump_no_envelope = Plist::Emit.dump(hsh, false, indent: nil)
+ hsh = { :key1 => 1, 'key2' => 2 }
+ output_plist_node = Plist::Emit.plist_node(hsh, :indent => nil)
+ output_plist_dump_with_envelope = Plist::Emit.dump(hsh, true, :indent => nil)
+ output_plist_dump_no_envelope = Plist::Emit.dump(hsh, false, :indent => nil)
expected_with_envelope = <<-STR
<?xml version="1.0" encoding="UTF-8"?>
@@ -102,7 +102,7 @@ STR
assert_equal expected_with_envelope, output_plist_dump_with_envelope
assert_equal expected_no_envelope, output_plist_dump_no_envelope
- hsh.save_plist('test.plist', indent: nil)
+ hsh.save_plist('test.plist', :indent => nil)
output_plist_file = File.read('test.plist')
assert_equal expected_with_envelope, output_plist_file
File.unlink('test.plist')