Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

test suite fails with recent MiniTest and TestUnit #30

Closed
voxik opened this issue Feb 6, 2012 · 1 comment
Closed

test suite fails with recent MiniTest and TestUnit #30

voxik opened this issue Feb 6, 2012 · 1 comment

Comments

@voxik
Copy link

voxik commented Feb 6, 2012

It seems that assert does not accept object as a test message anymore. #to_s could be used to fix this issues, however I am not sure that it will improve the readability in case of failure.

Test-Unit:

===============================================================================
Error:
test_single_endpoint(OpenID::MakeCompoundFilterTest):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <#<Method: OpenID::Yadis::BasicServiceEndpoint#from_basic_service_endpoint>>(<Method>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:210:in `test_single_endpoint'
===============================================================================
..E
===============================================================================
Error:
test_parts_array(OpenID::MakeFilterTest):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <#<OpenID::Yadis::TransformFilterMaker:0x92a516c @filter_procs=[#<Method: OpenID::Yadis::BasicServiceEndpoint#from_basic_service_endpoint>, #<Method: OpenID::Yadis::BasicServiceEndpoint#from_basic_service_endpoint>]>>(<OpenID::Yadis::TransformFilterMaker>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:177:in `test_parts_array'
===============================================================================
E
===============================================================================
Error:
test_parts_nil(OpenID::MakeFilterTest):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <#<OpenID::Yadis::TransformFilterMaker:0x92ac3f4 @filter_procs=[#<Method: OpenID::Yadis::BasicServiceEndpoint.from_basic_service_endpoint>]>>(<OpenID::Yadis::TransformFilterMaker>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:168:in `test_parts_nil'
===============================================================================
E
===============================================================================
Error:
test_parts_single(OpenID::MakeFilterTest):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <#<OpenID::Yadis::TransformFilterMaker:0x92b4b80 @filter_procs=[#<Method: OpenID::Yadis::BasicServiceEndpoint#from_basic_service_endpoint>]>>(<OpenID::Yadis::TransformFilterMaker>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:186:in `test_parts_single'
===============================================================================
...............................................................................
...............................................................................
.......................................E
===============================================================================
Error:
test_store(OpenID::Store::FileStoreTestCase):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <#<OpenID::Association:0x8823414 @handle=":hm'\\mn2z:LTxR5fd*^J\\Vps0ku9ElVF#h@FDLJ;JV<Op1Z\\Ecr@[\"d}POogV7Gc?!VED1cTT)Qn=7ueuc<Rg~m2^<YHWTH\"U\\'OI-(>g*a\"LI>\".~z6*l6[UD+VWX7O", @secret="\xFD\xADQ\xC3)g\xB5\xAE\x1A\xD3\nL\xD8\\\xD6\x1E\xC5\xB6\xE9\xAE", @issued=2012-02-06 10:36:45 +0000, @lifetime=600, @assoc_type="HMAC-SHA1">>(<OpenID::Association>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_stores.rb:122:in `test_store'
===============================================================================
...E
===============================================================================
Error:
test_store(OpenID::Store::MemoryStoreTestCase):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <#<OpenID::Association:0x92b709c @handle="7vP{}iCXaA$L#.^Vd}Y7^k9\"}#VZMVJ'([2n|~U(,W=}Wo*[]>f)>#e-/@hf\"OsW/T?\#@fH;=n=G3%:E9j|,0tCm|il:;]{6Z=!6kMXj#zkt1{!|tODv(r`*m50Q94D,", @secret="\xF8\xCE\xE6\xF0|\xEF^\xA2\xEA\x996\x8Fp\xC6y\xB8\xCE\x1Ai\x00", @issued=2012-02-06 10:36:45 +0000, @lifetime=600, @assoc_type="HMAC-SHA1">>(<OpenID::Association>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_stores.rb:122:in `test_store'
===============================================================================
...............................................................................
........................................E
===============================================================================
Error:
test_dictOfLists(OpenID::TestDecode):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <#<ArgumentError: Query dict must have one value for each key, not lists of values.  Query is {"openid.mode"=>["checkid_setup"], "openid.identity"=>"http://decoder.am.unittest/", "openid.assoc_handle"=>"{assoc}{handle}", "openid.return_to"=>"http://rp.unittest/foobot/?qux=zam", "openid.trust_root"=>"http://rp.unittest/"}>>(<ArgumentError>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_server.rb:211:in `rescue in test_dictOfLists'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_server.rb:208:in `test_dictOfLists'
===============================================================================
...............................................................................
..........................................................E
===============================================================================
Error:
test_cancel(OpenID::TestSigningEncode):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <{"openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.mode"=>"cancel"}>(<Hash>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_server.rb:1011:in `test_cancel'
===============================================================================
....................................................E
===============================================================================
Error:
test_build_discovery_url(TrustRootTest):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <["http://foo.com/path", "http://foo.com/path", "http://foo.com/path"]>(<Array>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:110:in `block in test_build_discovery_url'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:106:in `each'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:106:in `test_build_discovery_url'
===============================================================================
.E
===============================================================================
Error:
test_trustroots(TrustRootTest):
ArgumentError: assertion message must be String, Proc or Test::Unit::Assertions::AssertionMessage: <[["", "23: Does not parse", "baz.org\n*.foo.com\nhttp://*.schtuff.*/\nftp://foo.com\nftp://*.foo.com\nhttp://*.foo.com:80:90/\nfoo.*.com\nhttp://foo.*.com\nhttp://www.*\nhttp://*foo.com/\nhttp://foo.com/invalid#fragment\nhttp://..it/\nhttp://.it/\nhttp://*:8081/\nhttp://*:80\nhttp://localhost:1900foo/\nhttp://foo.com\\/\nhttp://�.pi.com/\nhttp://lambda.com/�\n\n \n \t\n5", "14: Insane", "http:///\nhttp://*/\nhttps://*/\nhttp://*.com\nhttp://*.com/\nhttps://*.com/\nhttp://*.com.au/\nhttp://*.co.uk/\nhttp://*.foo.notatld/\nhttps://*.foo.notatld/\nhttp://*.museum/\nhttps://*.museum/\nhttp://www.schtuffcom/\nhttp://it/", "18: Sane", "http://*.schtuff.com./\nhttp://*.schtuff.com/\nhttp://*.foo.schtuff.com/\nhttp://*.schtuff.com\nhttp://www.schtuff.com/\nhttp://www.schtuff.com./\nhttp://www.schutff.com\nhttp://*.this.that.schtuff.com/\nhttp://*.foo.com/path\nhttp://*.foo.com/path?action=foo2\nhttp://x.foo.com/path?action=foo2\nhttp://x.foo.com/path?action=%3D\nhttp://localhost:8081/\nhttp://localhost:8082/?action=openid\nhttps://foo.com/\nhttp://kink.fm/should/be/sane\nhttp://beta.lingu.no/\nhttp://goathack.livejournal.org:8020/openid/login.bml"], ["bad", "insane", "sane"]]>(<Array>)
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:59:in `getTests'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:42:in `test_trustroots'
===============================================================================

MiniTest:

  7) Error:
test_single_endpoint(OpenID::MakeCompoundFilterTest):
ArgumentError: assertion message must be String or Proc, but Method was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:210:in `test_single_endpoint'
  8) Error:
test_parts_array(OpenID::MakeFilterTest):
ArgumentError: assertion message must be String or Proc, but OpenID::Yadis::TransformFilterMaker was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:177:in `test_parts_array'
  9) Error:
test_parts_nil(OpenID::MakeFilterTest):
ArgumentError: assertion message must be String or Proc, but OpenID::Yadis::TransformFilterMaker was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:168:in `test_parts_nil'
 10) Error:
test_parts_single(OpenID::MakeFilterTest):
ArgumentError: assertion message must be String or Proc, but OpenID::Yadis::TransformFilterMaker was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_filters.rb:186:in `test_parts_single'
 11) Error:
test_store(OpenID::Store::FileStoreTestCase):
ArgumentError: assertion message must be String or Proc, but OpenID::Association was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_stores.rb:122:in `test_store'
 12) Error:
test_store(OpenID::Store::MemoryStoreTestCase):
ArgumentError: assertion message must be String or Proc, but OpenID::Association was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_stores.rb:122:in `test_store'
 13) Error:
test_dictOfLists(OpenID::TestDecode):
ArgumentError: assertion message must be String or Proc, but ArgumentError was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_server.rb:211:in `rescue in test_dictOfLists'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_server.rb:208:in `test_dictOfLists'
 14) Error:
test_getAssocExpired(OpenID::TestSignatory):
ArgumentError: assertion message must be String or Proc, but NilClass was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_server.rb:2343:in `test_getAssocExpired'
 15) Error:
test_cancel(OpenID::TestSigningEncode):
ArgumentError: assertion message must be String or Proc, but Hash was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_server.rb:1011:in `test_cancel'
 16) Error:
test_build_discovery_url(TrustRootTest):
ArgumentError: assertion message must be String or Proc, but Array was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:110:in `block in test_build_discovery_url'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:106:in `each'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:106:in `test_build_discovery_url'
 17) Error:
test_trustroots(TrustRootTest):
ArgumentError: assertion message must be String or Proc, but Array was given.
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:59:in `getTests'
    /builddir/build/BUILD/ruby-openid-2.1.7/test/test_trustroot.rb:42:in `test_trustroots'
@mmell
Copy link

mmell commented Feb 27, 2012

I cleaned up the tests in this commit: https://github.com/mmell/ruby-openid/commit/9c112b067ee05f579bc6a9288e5bb3105af563a7#test

If you pull my branch, I think the tests will work for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants