ruby-changes:15669
From: nobu <ko1@a...>
Date: Sun, 2 May 2010 17:25:21 +0900 (JST)
Subject: [ruby-changes:15669] Ruby:r27587 (trunk): * test: fixed wrong assertions.
nobu 2010-05-02 17:25:11 +0900 (Sun, 02 May 2010) New Revision: 27587 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27587 Log: * test: fixed wrong assertions. Modified files: trunk/test/json/test_json_addition.rb trunk/test/openssl/test_x509store.rb Index: test/json/test_json_addition.rb =================================================================== --- test/json/test_json_addition.rb (revision 27586) +++ test/json/test_json_addition.rb (revision 27587) @@ -151,12 +151,12 @@ 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) + assert_equal 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) + assert_equal 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) end end Index: test/openssl/test_x509store.rb =================================================================== --- test/openssl/test_x509store.rb (revision 27586) +++ test/openssl/test_x509store.rb (revision 27587) @@ -65,15 +65,15 @@ crl2_2 = issue_crl(revoke_info, 2, now-100, now-1, [], ca2_cert, @rsa1024, OpenSSL::Digest::SHA1.new) - assert(true, ca1_cert.verify(ca1_cert.public_key)) # self signed - assert(true, ca2_cert.verify(ca1_cert.public_key)) # issued by ca1 - assert(true, ee1_cert.verify(ca2_cert.public_key)) # issued by ca2 - assert(true, ee2_cert.verify(ca2_cert.public_key)) # issued by ca2 - assert(true, ee3_cert.verify(ca2_cert.public_key)) # issued by ca2 - assert(true, crl1.verify(ca1_cert.public_key)) # issued by ca1 - assert(true, crl1_2.verify(ca1_cert.public_key)) # issued by ca1 - assert(true, crl2.verify(ca2_cert.public_key)) # issued by ca2 - assert(true, crl2_2.verify(ca2_cert.public_key)) # issued by ca2 + assert_equal(true, ca1_cert.verify(ca1_cert.public_key)) # self signed + assert_equal(true, ca2_cert.verify(ca1_cert.public_key)) # issued by ca1 + assert_equal(true, ee1_cert.verify(ca2_cert.public_key)) # issued by ca2 + assert_equal(true, ee2_cert.verify(ca2_cert.public_key)) # issued by ca2 + assert_equal(true, ee3_cert.verify(ca2_cert.public_key)) # issued by ca2 + assert_equal(true, crl1.verify(ca1_cert.public_key)) # issued by ca1 + assert_equal(true, crl1_2.verify(ca1_cert.public_key)) # issued by ca1 + assert_equal(true, crl2.verify(ca2_cert.public_key)) # issued by ca2 + assert_equal(true, crl2_2.verify(ca2_cert.public_key)) # issued by ca2 store = OpenSSL::X509::Store.new assert_equal(false, store.verify(ca1_cert)) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/