openid/ruby-openid — Issue #30: test suite fails with recent MiniTest and TestUnit
Author: voxik
Created: 2012-02-06 12:12:39+00:00
State: open

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: <#>()
/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: <#, #]>>()
/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: <#]>>()
/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: <#]>>()
/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: <#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">>()
/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: <#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">>()
/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: <#["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/"}>>()
/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"}>()
/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"]>()
/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"]]>()
/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'
```