ruby-openid 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ruby-openid might be problematic. Click here for more details.

Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/lib/openid/association.rb +1 -1
  4. data/lib/openid/cryptutil.rb +5 -5
  5. data/lib/openid/message.rb +1 -1
  6. data/lib/openid/trustroot.rb +2 -2
  7. data/lib/openid/urinorm.rb +4 -6
  8. data/lib/openid/util.rb +0 -2
  9. data/lib/openid/version.rb +1 -1
  10. data/test/discoverdata.rb +1 -2
  11. data/test/test_accept.rb +4 -5
  12. data/test/test_association.rb +4 -3
  13. data/test/test_associationmanager.rb +22 -24
  14. data/test/test_ax.rb +9 -9
  15. data/test/test_checkid_request.rb +6 -8
  16. data/test/test_consumer.rb +5 -5
  17. data/test/test_cryptutil.rb +5 -5
  18. data/test/test_dh.rb +2 -2
  19. data/test/test_discover.rb +19 -23
  20. data/test/test_discovery_manager.rb +6 -7
  21. data/test/test_extension.rb +2 -2
  22. data/test/test_fetchers.rb +16 -16
  23. data/test/test_filters.rb +7 -7
  24. data/test/test_idres.rb +25 -40
  25. data/test/test_kvform.rb +5 -5
  26. data/test/test_kvpost.rb +2 -2
  27. data/test/test_linkparse.rb +3 -5
  28. data/test/test_message.rb +19 -19
  29. data/test/test_nonce.rb +2 -2
  30. data/test/test_oauth.rb +3 -3
  31. data/test/test_openid_yadis.rb +2 -2
  32. data/test/test_pape.rb +4 -4
  33. data/test/test_parsehtml.rb +3 -3
  34. data/test/test_responses.rb +2 -2
  35. data/test/test_server.rb +53 -53
  36. data/test/test_sreg.rb +6 -6
  37. data/test/test_stores.rb +12 -12
  38. data/test/test_trustroot.rb +2 -2
  39. data/test/test_ui.rb +2 -2
  40. data/test/test_urinorm.rb +2 -2
  41. data/test/test_util.rb +2 -2
  42. data/test/test_xrds.rb +15 -15
  43. data/test/test_xri.rb +4 -4
  44. data/test/test_xrires.rb +2 -2
  45. data/test/test_yadis_discovery.rb +5 -5
  46. data/test/testutil.rb +8 -1
  47. metadata +18 -7
  48. data/lib/openid/extras.rb +0 -13
  49. data/test/test_extras.rb +0 -35
@@ -1,8 +1,8 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'openid/store/nonce'
3
3
 
4
4
  module OpenID
5
- class NonceTestCase < Test::Unit::TestCase
5
+ class NonceTestCase < Minitest::Test
6
6
 
7
7
  NONCE_RE = /\A\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ/
8
8
 
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'openid/extensions/oauth'
3
3
  require 'openid/message'
4
4
  require 'openid/server'
@@ -7,7 +7,7 @@ require 'openid/consumer/discovery'
7
7
 
8
8
  module OpenID
9
9
  module OAuthTest
10
- class OAuthRequestTestCase < Test::Unit::TestCase
10
+ class OAuthRequestTestCase < Minitest::Test
11
11
  def setup
12
12
  @req = OAuth::Request.new
13
13
  end
@@ -92,7 +92,7 @@ module OpenID
92
92
 
93
93
  end
94
94
 
95
- class OAuthResponseTestCase < Test::Unit::TestCase
95
+ class OAuthResponseTestCase < Minitest::Test
96
96
  def setup
97
97
  @req = OAuth::Response.new
98
98
  end
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'openid/consumer/discovery'
3
3
  require 'openid/yadis/services'
4
4
 
@@ -143,7 +143,7 @@ EOF
143
143
  end
144
144
  end
145
145
 
146
- class OpenIDYadisTests < Test::Unit::TestCase
146
+ class OpenIDYadisTests < Minitest::Test
147
147
  def test_openid_yadis
148
148
  data = []
149
149
 
@@ -1,12 +1,12 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'openid/extensions/pape'
3
3
  require 'openid/message'
4
4
  require 'openid/server'
5
- require 'openid/consumer/responses'
5
+ require 'openid/consumer'
6
6
 
7
7
  module OpenID
8
8
  module PAPETest
9
- class PapeRequestTestCase < Test::Unit::TestCase
9
+ class PapeRequestTestCase < Minitest::Test
10
10
  def setup
11
11
  @req = PAPE::Request.new
12
12
  end
@@ -103,7 +103,7 @@ module OpenID
103
103
 
104
104
  end
105
105
 
106
- class PapeResponseTestCase < Test::Unit::TestCase
106
+ class PapeResponseTestCase < Minitest::Test
107
107
  def setup
108
108
  @req = PAPE::Response.new
109
109
  end
@@ -1,9 +1,9 @@
1
- require "test/unit"
1
+ require "minitest/autorun"
2
2
  require "testutil"
3
3
  require "openid/yadis/parsehtml"
4
4
 
5
5
  module OpenID
6
- class ParseHTMLTestCase < Test::Unit::TestCase
6
+ class ParseHTMLTestCase < Minitest::Test
7
7
  include OpenID::TestDataMixin
8
8
 
9
9
  def test_parsehtml
@@ -27,7 +27,7 @@ module OpenID
27
27
  end
28
28
 
29
29
  # the HTML tokenizer test
30
- class TC_TestHTMLTokenizer < Test::Unit::TestCase
30
+ class TC_TestHTMLTokenizer < Minitest::Test
31
31
  def test_bad_link
32
32
  toke = HTMLTokenizer.new("<p><a href=http://bad.com/link>foo</a></p>")
33
33
  assert("http://bad.com/link" == toke.getTag("a").attr_hash['href'])
@@ -1,11 +1,11 @@
1
- require "test/unit"
1
+ require "minitest/autorun"
2
2
  require "openid/consumer/discovery"
3
3
  require "openid/consumer/responses"
4
4
 
5
5
  module OpenID
6
6
  class Consumer
7
7
  module TestResponses
8
- class TestSuccessResponse < Test::Unit::TestCase
8
+ class TestSuccessResponse < Minitest::Test
9
9
  def setup
10
10
  @endpoint = OpenIDServiceEndpoint.new
11
11
  @endpoint.claimed_id = 'identity_url'
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'testutil'
3
3
  require 'util'
4
4
  require 'uri'
@@ -39,7 +39,7 @@ module OpenID
39
39
  end
40
40
  end
41
41
 
42
- class TestProtocolError < Test::Unit::TestCase
42
+ class TestProtocolError < Minitest::Test
43
43
  def test_browserWithReturnTo
44
44
  return_to = "http://rp.unittest/consumer"
45
45
  # will be a ProtocolError raised by Decode or
@@ -151,7 +151,7 @@ module OpenID
151
151
  end
152
152
  end
153
153
 
154
- class TestDecode < Test::Unit::TestCase
154
+ class TestDecode < Minitest::Test
155
155
  def setup
156
156
  @claimed_id = 'http://de.legating.de.coder.unittest/'
157
157
  @id_url = "http://decoder.am.unittest/"
@@ -175,7 +175,7 @@ module OpenID
175
175
  'pony' => 'spotted',
176
176
  'sreg.mutant_power' => 'decaffinator',
177
177
  }
178
- assert_raise(Server::ProtocolError) {
178
+ assert_raises(Server::ProtocolError) {
179
179
  @decode.call(args)
180
180
  }
181
181
  end
@@ -185,7 +185,7 @@ module OpenID
185
185
  'openid.mode' => 'twos-compliment',
186
186
  'openid.pants' => 'zippered',
187
187
  }
188
- assert_raise(Server::ProtocolError) {
188
+ assert_raises(Server::ProtocolError) {
189
189
  @decode.call(args)
190
190
  }
191
191
  end
@@ -242,7 +242,7 @@ module OpenID
242
242
  'openid.claimed_id' => @id_url,
243
243
  'openid.assoc_handle' => @assoc_handle,
244
244
  }
245
- assert_raise(Server::ProtocolError) {
245
+ assert_raises(Server::ProtocolError) {
246
246
  m = Message.from_post_args(args)
247
247
  Server::CheckIDRequest.from_message(m, @op_endpoint)
248
248
  }
@@ -333,7 +333,7 @@ module OpenID
333
333
  'openid.return_to' => @rt_url,
334
334
  'openid.realm' => @tr_url,
335
335
  }
336
- assert_raise(Server::ProtocolError) {
336
+ assert_raises(Server::ProtocolError) {
337
337
  @decode.call(args)
338
338
  }
339
339
  end
@@ -364,7 +364,7 @@ module OpenID
364
364
  'openid.assoc_handle' => @assoc_handle,
365
365
  'openid.trust_root' => @tr_url,
366
366
  }
367
- assert_raise(Server::ProtocolError) {
367
+ assert_raises(Server::ProtocolError) {
368
368
  @decode.call(args)
369
369
  }
370
370
  end
@@ -385,15 +385,15 @@ module OpenID
385
385
  req = @decode.call(args)
386
386
  assert(req.is_a?(Server::CheckIDRequest))
387
387
 
388
- assert_raise(Server::NoReturnToError) {
388
+ assert_raises(Server::NoReturnToError) {
389
389
  req.answer(false)
390
390
  }
391
391
 
392
- assert_raise(Server::NoReturnToError) {
392
+ assert_raises(Server::NoReturnToError) {
393
393
  req.encode_to_url('bogus')
394
394
  }
395
395
 
396
- assert_raise(Server::NoReturnToError) {
396
+ assert_raises(Server::NoReturnToError) {
397
397
  req.cancel_url
398
398
  }
399
399
  end
@@ -408,7 +408,7 @@ module OpenID
408
408
  'openid.identity' => @id_url,
409
409
  'openid.assoc_handle' => @assoc_handle,
410
410
  }
411
- assert_raise(Server::ProtocolError) {
411
+ assert_raises(Server::ProtocolError) {
412
412
  @decode.call(args)
413
413
  }
414
414
  end
@@ -447,7 +447,7 @@ module OpenID
447
447
  end
448
448
 
449
449
  def test_checkidSetupUntrustedReturn_Constructor
450
- assert_raise(Server::UntrustedReturnURL) {
450
+ assert_raises(Server::UntrustedReturnURL) {
451
451
  Server::CheckIDRequest.new(@id_url, @rt_url, nil,
452
452
  'http://not-the-return-place.unittest/',
453
453
  false, @assoc_handle)
@@ -455,7 +455,7 @@ module OpenID
455
455
  end
456
456
 
457
457
  def test_checkidSetupMalformedReturnURL_Constructor
458
- assert_raise(Server::MalformedReturnURL) {
458
+ assert_raises(Server::MalformedReturnURL) {
459
459
  Server::CheckIDRequest.new(@id_url, 'bogus://return.url', nil,
460
460
  'http://trustroot.com/',
461
461
  false, @assoc_handle)
@@ -488,7 +488,7 @@ module OpenID
488
488
  'openid.bar' => 'signedval2',
489
489
  'openid.baz' => 'unsigned',
490
490
  }
491
- assert_raise(Server::ProtocolError) {
491
+ assert_raises(Server::ProtocolError) {
492
492
  @decode.call(args)
493
493
  }
494
494
  end
@@ -531,7 +531,7 @@ module OpenID
531
531
  'openid.session_type' => 'DH-SHA1',
532
532
  }
533
533
  # Using DH-SHA1 without supplying dh_consumer_public is an error.
534
- assert_raise(Server::ProtocolError) {
534
+ assert_raises(Server::ProtocolError) {
535
535
  @decode.call(args)
536
536
  }
537
537
  end
@@ -542,7 +542,7 @@ module OpenID
542
542
  'openid.session_type' => 'DH-SHA1',
543
543
  'openid.dh_consumer_public' => "donkeydonkeydonkey",
544
544
  }
545
- assert_raise(Server::ProtocolError) {
545
+ assert_raises(Server::ProtocolError) {
546
546
  @decode.call(args)
547
547
  }
548
548
  end
@@ -577,7 +577,7 @@ module OpenID
577
577
  'openid.dh_modulus' => 'pizza',
578
578
  'openid.dh_gen' => 'gnocchi',
579
579
  }
580
- assert_raise(Server::ProtocolError) {
580
+ assert_raises(Server::ProtocolError) {
581
581
  @decode.call(args)
582
582
  }
583
583
  end
@@ -589,7 +589,7 @@ module OpenID
589
589
  'openid.dh_consumer_public' => "Rzup9265tw==",
590
590
  'openid.dh_modulus' => 'pizza',
591
591
  }
592
- assert_raise(Server::ProtocolError) {
592
+ assert_raises(Server::ProtocolError) {
593
593
  @decode.call(args)
594
594
  }
595
595
  end
@@ -601,7 +601,7 @@ module OpenID
601
601
  'openid.dh_consumer_public' => "Rzup9265tw==",
602
602
  'openid.dh_gen' => 'pizza',
603
603
  }
604
- assert_raise(Server::ProtocolError) {
604
+ assert_raises(Server::ProtocolError) {
605
605
  @decode.call(args)
606
606
  }
607
607
  end
@@ -625,7 +625,7 @@ module OpenID
625
625
  'openid.session_type' => 'FLCL6',
626
626
  'openid.dh_consumer_public' => "YQ==\n",
627
627
  }
628
- assert_raise(Server::ProtocolError) {
628
+ assert_raises(Server::ProtocolError) {
629
629
  @decode.call(args)
630
630
  }
631
631
  end
@@ -646,7 +646,7 @@ module OpenID
646
646
  'openid.session_type' => 'DH-SHA1',
647
647
  'openid.dh_consumer_public' => "my public keeey",
648
648
  }
649
- assert_raise(Server::ProtocolError) {
649
+ assert_raises(Server::ProtocolError) {
650
650
  @decode.call(args)
651
651
  }
652
652
  end
@@ -675,7 +675,7 @@ module OpenID
675
675
  end
676
676
  end
677
677
 
678
- class TestEncode < Test::Unit::TestCase
678
+ class TestEncode < Minitest::Test
679
679
  def setup
680
680
  @encoder = Server::Encoder.new
681
681
  @encode = @encoder.method('encode')
@@ -826,7 +826,7 @@ module OpenID
826
826
  assert(webresponse.headers.member?('location'))
827
827
 
828
828
  location = webresponse.headers['location']
829
- assert(location.starts_with?(request.return_to),
829
+ assert(location.start_with?(request.return_to),
830
830
  sprintf("%s does not start with %s",
831
831
  location, request.return_to))
832
832
  # argh.
@@ -906,7 +906,7 @@ module OpenID
906
906
  'openid.identity' => 'http://limu.unittest/',
907
907
  })
908
908
  e = Server::ProtocolError.new(args, "wet paint")
909
- assert_raise(Server::EncodingError) {
909
+ assert_raises(Server::EncodingError) {
910
910
  @encode.call(e)
911
911
  }
912
912
  end
@@ -924,7 +924,7 @@ module OpenID
924
924
  end
925
925
  end
926
926
 
927
- class TestSigningEncode < Test::Unit::TestCase
927
+ class TestSigningEncode < Minitest::Test
928
928
  def setup
929
929
  @_dumb_key = Server::Signatory._dumb_key
930
930
  @_normal_key = Server::Signatory._normal_key
@@ -981,7 +981,7 @@ module OpenID
981
981
 
982
982
  def test_forgotStore
983
983
  @encoder.signatory = nil
984
- assert_raise(ArgumentError) {
984
+ assert_raises(ArgumentError) {
985
985
  @encode.call(@response)
986
986
  }
987
987
  end
@@ -1019,13 +1019,13 @@ module OpenID
1019
1019
 
1020
1020
  def test_alreadySigned
1021
1021
  @response.fields.set_arg(OPENID_NS, 'sig', 'priorSig==')
1022
- assert_raise(Server::AlreadySigned) {
1022
+ assert_raises(Server::AlreadySigned) {
1023
1023
  @encode.call(@response)
1024
1024
  }
1025
1025
  end
1026
1026
  end
1027
1027
 
1028
- class TestCheckID < Test::Unit::TestCase
1028
+ class TestCheckID < Minitest::Test
1029
1029
  def setup
1030
1030
  @op_endpoint = 'http://endpoint.unittest/'
1031
1031
  @store = Store::Memory.new()
@@ -1184,7 +1184,7 @@ module OpenID
1184
1184
  @request.identity = nil
1185
1185
  # XXX - Check on this, I think this behavior is legal in OpenID
1186
1186
  # 2.0?
1187
- assert_raise(ArgumentError) {
1187
+ assert_raises(ArgumentError) {
1188
1188
  @request.answer(true, nil, "=V")
1189
1189
  }
1190
1190
  end
@@ -1198,7 +1198,7 @@ module OpenID
1198
1198
 
1199
1199
  def test_answerAllowWithNoIdentity
1200
1200
  @request.identity = IDENTIFIER_SELECT
1201
- assert_raise(ArgumentError) {
1201
+ assert_raises(ArgumentError) {
1202
1202
  @request.answer(true, nil, nil)
1203
1203
  }
1204
1204
  end
@@ -1225,7 +1225,7 @@ module OpenID
1225
1225
  @request.mode = 'checkid_immediate'
1226
1226
  @request.op_endpoint = nil
1227
1227
 
1228
- assert_raise(ArgumentError) {
1228
+ assert_raises(ArgumentError) {
1229
1229
  @request.answer(false)
1230
1230
  }
1231
1231
  end
@@ -1240,7 +1240,7 @@ module OpenID
1240
1240
  server_url = "http://server.com/server"
1241
1241
 
1242
1242
  url = @request.encode_to_url(server_url)
1243
- assert(url.starts_with?(server_url))
1243
+ assert(url.start_with?(server_url))
1244
1244
 
1245
1245
  _, query = url.split("?", 2)
1246
1246
  args = Util.parse_query(query)
@@ -1272,7 +1272,7 @@ module OpenID
1272
1272
  @request.identity = IDENTIFIER_SELECT
1273
1273
  selected_id = 'http://anon.unittest/9861'
1274
1274
  claimed_id = 'http://monkeyhat.unittest/'
1275
- assert_raise(Server::VersionError) {
1275
+ assert_raises(Server::VersionError) {
1276
1276
  @request.answer(true, nil, selected_id, claimed_id)
1277
1277
  }
1278
1278
  end
@@ -1280,7 +1280,7 @@ module OpenID
1280
1280
  def test_answerAllowWithAnotherIdentity
1281
1281
  # XXX - Check on this, I think this behavior is legal in OpenID
1282
1282
  # 2.0?
1283
- assert_raise(ArgumentError){
1283
+ assert_raises(ArgumentError){
1284
1284
  @request.answer(true, nil, "http://pebbles.unittest/")
1285
1285
  }
1286
1286
  end
@@ -1288,14 +1288,14 @@ module OpenID
1288
1288
  def test_answerAllowNoIdentityOpenID1
1289
1289
  @request.message = Message.new(OPENID1_NS)
1290
1290
  @request.identity = nil
1291
- assert_raise(ArgumentError) {
1291
+ assert_raises(ArgumentError) {
1292
1292
  @request.answer(true, nil, nil)
1293
1293
  }
1294
1294
  end
1295
1295
 
1296
1296
  def test_answerAllowForgotEndpoint
1297
1297
  @request.op_endpoint = nil
1298
- assert_raise(RuntimeError) {
1298
+ assert_raises(RuntimeError) {
1299
1299
  @request.answer(true)
1300
1300
  }
1301
1301
  end
@@ -1307,7 +1307,7 @@ module OpenID
1307
1307
  msg.set_arg(OPENID_NS, 'mode', 'checkid_setup')
1308
1308
  msg.set_arg(OPENID_NS, 'assoc_handle', 'bogus')
1309
1309
 
1310
- assert_raise(Server::ProtocolError) {
1310
+ assert_raises(Server::ProtocolError) {
1311
1311
  Server::CheckIDRequest.from_message(msg, @server)
1312
1312
  }
1313
1313
  end
@@ -1318,7 +1318,7 @@ module OpenID
1318
1318
  msg.set_arg(OPENID_NS, 'return_to', 'http://invalid:8000/rt')
1319
1319
  msg.set_arg(OPENID_NS, 'claimed_id', 'https://example.myopenid.com')
1320
1320
 
1321
- assert_raise(Server::ProtocolError) {
1321
+ assert_raises(Server::ProtocolError) {
1322
1322
  Server::CheckIDRequest.from_message(msg, @server)
1323
1323
  }
1324
1324
  end
@@ -1329,7 +1329,7 @@ module OpenID
1329
1329
  msg.set_arg(OPENID_NS, 'return_to', 'http://invalid:8000/rt')
1330
1330
  msg.set_arg(OPENID_NS, 'identity', 'https://example.myopenid.com')
1331
1331
 
1332
- assert_raise(Server::ProtocolError) {
1332
+ assert_raises(Server::ProtocolError) {
1333
1333
  Server::CheckIDRequest.from_message(msg, @server)
1334
1334
  }
1335
1335
  end
@@ -1423,7 +1423,7 @@ module OpenID
1423
1423
  assert_equal('id_res', answer.fields.get_arg(OPENID_NS, 'mode'))
1424
1424
 
1425
1425
  usu = answer.fields.get_arg(OPENID_NS, 'user_setup_url', '')
1426
- assert(usu.starts_with?(server_url))
1426
+ assert(usu.start_with?(server_url))
1427
1427
  expected_substr = 'openid.claimed_id=http%3A%2F%2Fclaimed-id.test%2F'
1428
1428
  assert(!usu.index(expected_substr).nil?, usu)
1429
1429
  end
@@ -1466,7 +1466,7 @@ module OpenID
1466
1466
  def test_getCancelURLimmed
1467
1467
  @request.mode = 'checkid_immediate'
1468
1468
  @request.immediate = true
1469
- assert_raise(ArgumentError) {
1469
+ assert_raises(ArgumentError) {
1470
1470
  @request.cancel_url
1471
1471
  }
1472
1472
  end
@@ -1497,7 +1497,7 @@ module OpenID
1497
1497
  end
1498
1498
  end
1499
1499
 
1500
- class TestCheckIDExtension < Test::Unit::TestCase
1500
+ class TestCheckIDExtension < Minitest::Test
1501
1501
 
1502
1502
  def setup
1503
1503
  @op_endpoint = 'http://endpoint.unittest/ext'
@@ -1574,7 +1574,7 @@ module OpenID
1574
1574
  end
1575
1575
  end
1576
1576
 
1577
- class TestCheckAuth < Test::Unit::TestCase
1577
+ class TestCheckAuth < Minitest::Test
1578
1578
  def setup
1579
1579
  @assoc_handle = 'mooooooooo'
1580
1580
  @message = Message.from_post_args({
@@ -1644,7 +1644,7 @@ module OpenID
1644
1644
  end
1645
1645
  end
1646
1646
 
1647
- class TestAssociate < Test::Unit::TestCase
1647
+ class TestAssociate < Minitest::Test
1648
1648
  # TODO: test DH with non-default values for modulus and gen.
1649
1649
  # (important to do because we actually had it broken for a while.)
1650
1650
 
@@ -1720,7 +1720,7 @@ module OpenID
1720
1720
 
1721
1721
  bad_request_argss.each { |request_args|
1722
1722
  message = Message.from_post_args(request_args)
1723
- assert_raise(Server::ProtocolError) {
1723
+ assert_raises(Server::ProtocolError) {
1724
1724
  Server::AssociateRequest.from_message(message)
1725
1725
  }
1726
1726
  }
@@ -1745,7 +1745,7 @@ module OpenID
1745
1745
 
1746
1746
  bad_request_argss.each { |request_args|
1747
1747
  message = Message.from_post_args(request_args)
1748
- assert_raise(Server::ProtocolError) {
1748
+ assert_raises(Server::ProtocolError) {
1749
1749
  Server::AssociateRequest.from_message(message)
1750
1750
  }
1751
1751
  }
@@ -1906,7 +1906,7 @@ module OpenID
1906
1906
  # the request was an OpenID 1 request.
1907
1907
  m = Message.new(OPENID1_NS)
1908
1908
 
1909
- assert_raise(Server::ProtocolError) {
1909
+ assert_raises(Server::ProtocolError) {
1910
1910
  @request.answer_unsupported(m)
1911
1911
  }
1912
1912
  end
@@ -1915,7 +1915,7 @@ module OpenID
1915
1915
  class UnhandledError < Exception
1916
1916
  end
1917
1917
 
1918
- class TestServer < Test::Unit::TestCase
1918
+ class TestServer < Minitest::Test
1919
1919
  include TestUtil
1920
1920
 
1921
1921
  def setup
@@ -1928,7 +1928,7 @@ module OpenID
1928
1928
  request = Server::OpenIDRequest.new()
1929
1929
  request.mode = "monkeymode"
1930
1930
  request.message = Message.new(OPENID1_NS)
1931
- assert_raise(RuntimeError) {
1931
+ assert_raises(RuntimeError) {
1932
1932
  @server.handle_request(request)
1933
1933
  }
1934
1934
  end
@@ -1952,7 +1952,7 @@ module OpenID
1952
1952
  request = Server::OpenIDRequest.new()
1953
1953
  request.mode = "monkeymode"
1954
1954
  request.message = Message.new(OPENID1_NS)
1955
- assert_raise(UnhandledError) {
1955
+ assert_raises(UnhandledError) {
1956
1956
  @server.handle_request(request)
1957
1957
  }
1958
1958
  end
@@ -2071,7 +2071,7 @@ module OpenID
2071
2071
  attr_accessor :assoc_handle, :namespace
2072
2072
  end
2073
2073
 
2074
- class TestSignatory < Test::Unit::TestCase
2074
+ class TestSignatory < Minitest::Test
2075
2075
  include TestUtil
2076
2076
 
2077
2077
  def setup
@@ -2393,7 +2393,7 @@ module OpenID
2393
2393
  end
2394
2394
  end
2395
2395
 
2396
- class RunthroughTestCase < Test::Unit::TestCase
2396
+ class RunthroughTestCase < Minitest::Test
2397
2397
  def setup
2398
2398
  @store = Store::Memory.new
2399
2399
  @server = Server::Server.new(@store, "http://example.com/openid/server")