summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Bleything <ben@bleything.net>2010-02-16 16:05:16 -0800
committerBen Bleything <ben@bleything.net>2010-02-16 16:05:16 -0800
commitf51aa926cf381d9c1dde3c81c00ac00b7eb5c1ee (patch)
tree283ce11f77489f1d380f6c7656e53208d75fc415
parent88009766e20513aad7bd2b6c2bf9f71fa34349ad (diff)
downloadplist-f51aa926cf381d9c1dde3c81c00ac00b7eb5c1ee.tar.gz
rejigger a couple of parser tests so they pass
-rw-r--r--test/test_parser.rb23
1 files changed, 13 insertions, 10 deletions
diff --git a/test/test_parser.rb b/test/test_parser.rb
index 28ddd10..6116750 100644
--- a/test/test_parser.rb
+++ b/test/test_parser.rb
@@ -9,15 +9,18 @@ class TestParser < Test::Unit::TestCase
# dict
assert_kind_of( Hash, result )
- assert_equal( ["List of Albums",
- "Minor Version",
- "Master Image List",
- "Major Version",
- "List of Keywords",
- "Archive Path",
- "List of Rolls",
- "Application Version"],
- result.keys )
+
+ expected = [
+ "List of Albums",
+ "Minor Version",
+ "Master Image List",
+ "Major Version",
+ "List of Keywords",
+ "Archive Path",
+ "List of Rolls",
+ "Application Version"
+ ]
+ assert_equal( expected.sort, result.keys.sort )
# array
assert_kind_of( Array, result["List of Rolls"] )
@@ -56,7 +59,7 @@ class TestParser < Test::Unit::TestCase
def test_date_fields
result = Plist::parse_xml("test/assets/Cookies.plist")
assert_kind_of( DateTime, result.first['Expires'] )
- assert_equal( "2007-10-25T12:36:35Z", result.first['Expires'].to_s )
+ assert_equal DateTime.parse( "2007-10-25T12:36:35Z" ), result.first['Expires']
end
# bug fix for empty <key>