Skip to content

Commit

Permalink
Fix wrong assertion: use assert_equal.
Browse files Browse the repository at this point in the history
From Ruby r27587 and r27590, by nobu.
  • Loading branch information
nurse authored and flori committed May 3, 2010
1 parent d496f79 commit 9b781e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_json_addition.rb
Expand Up @@ -151,12 +151,12 @@ def test_core
def test_utc_datetime def test_utc_datetime
now = Time.now now = Time.now
d = DateTime.parse(now.to_s) # usual case 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 d = DateTime.parse(now.utc.to_s) # of = 0
assert d, JSON.parse(d.to_json) assert_equal d, JSON.parse(d.to_json)
d = DateTime.civil(2008, 6, 17, 11, 48, 32, 1) # of = 1 / 12 => 1/12 d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(1,24))
assert d, JSON.parse(d.to_json) assert_equal d, JSON.parse(d.to_json)
d = DateTime.civil(2008, 6, 17, 11, 48, 32, 12) # of = 12 / 12 => 12 d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24))
assert d, JSON.parse(d.to_json) assert_equal d, JSON.parse(d.to_json)
end end
end end

0 comments on commit 9b781e6

Please sign in to comment.