summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2010-05-05 23:44:22 +0200
committerFlorian Frank <flori@ping.de>2010-05-05 23:44:22 +0200
commit4ae585e5702145dcfaf037895dcb33d5a71c43c4 (patch)
treefcd308016706ef911bfdc2ea55c028442ea15969
parent82ed5b724fb36dcba884cdb2251d953580c9de56 (diff)
parent9b781e65f8231ae0db33eeccda27abab385d98ce (diff)
downloadjson-4ae585e5702145dcfaf037895dcb33d5a71c43c4.tar.gz
Merge branch 'master' of github.com:/flori/json
-rwxr-xr-xtests/test_json_addition.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_json_addition.rb b/tests/test_json_addition.rb
index ec89c07..844cd4f 100755
--- a/tests/test_json_addition.rb
+++ b/tests/test_json_addition.rb
@@ -151,12 +151,12 @@ class TC_JSONAddition < Test::Unit::TestCase
def test_utc_datetime
now = Time.now
d = DateTime.parse(now.to_s) # usual case
- assert d, JSON.parse(d.to_json)
+ assert_equal d, JSON.parse(d.to_json)
d = DateTime.parse(now.utc.to_s) # of = 0
- assert d, JSON.parse(d.to_json)
- d = DateTime.civil(2008, 6, 17, 11, 48, 32, 1) # of = 1 / 12 => 1/12
- assert d, JSON.parse(d.to_json)
- d = DateTime.civil(2008, 6, 17, 11, 48, 32, 12) # of = 12 / 12 => 12
- assert d, JSON.parse(d.to_json)
+ assert_equal d, JSON.parse(d.to_json)
+ d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(1,24))
+ assert_equal d, JSON.parse(d.to_json)
+ d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24))
+ assert_equal d, JSON.parse(d.to_json)
end
end