Skip to content

Commit 1168215

Browse files
author
Jerry Cheung
committed
use Minitest::Test
1 parent ead2469 commit 1168215

15 files changed

+24
-20
lines changed

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
source 'https://rubygems.org'
22
gemspec
3+
4+
group :test do
5+
gem "minitest", "~> 5.0"
6+
end

test/ber/core_ext/test_array.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative '../../test_helper'
22

3-
class TestBERArrayExtension < Test::Unit::TestCase
3+
class TestBERArrayExtension < Minitest::Test
44
def test_control_code_array
55
control_codes = []
66
control_codes << ['1.2.3'.to_ber, true.to_ber].to_ber_sequence

test/ber/core_ext/test_string.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative '../../test_helper'
22

3-
class TestBERStringExtension < Test::Unit::TestCase
3+
class TestBERStringExtension < Minitest::Test
44
def setup
55
@bind_request = "0$\002\001\001`\037\002\001\003\004\rAdministrator\200\vad_is_bogus UNCONSUMED".b
66
@result = @bind_request.read_ber!(Net::LDAP::AsnSyntax)

test/ber/test_ber.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative '../test_helper'
22

3-
class TestBEREncoding < Test::Unit::TestCase
3+
class TestBEREncoding < Minitest::Test
44
def test_empty_array
55
assert_equal [], [].to_ber.read_ber
66
end
@@ -84,7 +84,7 @@ def test_non_utf8_encodable_strings
8484
end
8585
end
8686

87-
class TestBERDecoding < Test::Unit::TestCase
87+
class TestBERDecoding < Minitest::Test
8888
def test_decode_number
8989
assert_equal 6, "\002\001\006".read_ber(Net::LDAP::AsnSyntax)
9090
end
@@ -98,7 +98,7 @@ def test_decode_ldap_bind_request
9898
end
9999
end
100100

101-
class TestBERIdentifiedString < Test::Unit::TestCase
101+
class TestBERIdentifiedString < Minitest::Test
102102
def test_binary_data
103103
data = ["6a31b4a12aa27a41aca9603f27dd5116"].pack("H*").force_encoding("ASCII-8BIT")
104104
bis = Net::BER::BerIdentifiedString.new(data)

test/test_dn.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require_relative '../test_helper'
22
require 'net/ldap/dn'
33

4-
class TestDN < Test::Unit::TestCase
4+
class TestDN < Minitest::Test
55
def test_escape
66
assert_equal '\\,\\+\\"\\\\\\<\\>\\;', Net::LDAP::DN.escape(',+"\\<>;')
77
end

test/test_entry.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative '../test_helper'
22

3-
class TestEntry < Test::Unit::TestCase
3+
class TestEntry < Minitest::Test
44
def setup
55
@entry = Net::LDAP::Entry.new 'cn=Barbara,o=corp'
66
end
@@ -41,7 +41,7 @@ def test_case_insensitive_attribute_names
4141
end
4242
end
4343

44-
class TestEntryLDIF < Test::Unit::TestCase
44+
class TestEntryLDIF < Minitest::Test
4545
def setup
4646
@entry = Net::LDAP::Entry.from_single_ldif_string(
4747
%Q{dn: something

test/test_filter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative '../test_helper'
22

3-
class TestFilter < Test::Unit::TestCase
3+
class TestFilter < Minitest::Test
44
Filter = Net::LDAP::Filter
55

66
def test_bug_7534_rfc2254
@@ -123,7 +123,7 @@ def test_ber_from_rfc2254_filter
123123

124124
# tests ported over from rspec. Not sure if these overlap with the above
125125
# https://github.com/ruby-ldap/ruby-net-ldap/pull/121
126-
class TestFilterRSpec < Test::Unit::TestCase
126+
class TestFilterRSpec < Minitest::Test
127127
def test_ex_convert
128128
assert_equal '(foo:=bar)', Net::LDAP::Filter.ex('foo', 'bar').to_s
129129
end

test/test_filter_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# encoding: utf-8
22
require_relative '../test_helper'
33

4-
class TestFilterParser < Test::Unit::TestCase
4+
class TestFilterParser < Minitest::Test
55
def test_ascii
66
assert_kind_of Net::LDAP::Filter, Net::LDAP::Filter::FilterParser.parse("(cn=name)")
77
end

test/test_ldap_connection.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative '../test_helper'
22

3-
class TestLDAPConnection < Test::Unit::TestCase
3+
class TestLDAPConnection < Minitest::Test
44
def test_unresponsive_host
55
assert_raise Net::LDAP::LdapError do
66
Net::LDAP::Connection.new(:host => 'test.mocked.com', :port => 636)
@@ -45,7 +45,7 @@ def test_modify_ops_replace
4545
end
4646

4747

48-
class TestLDAPConnectionErrors < Test::Unit::TestCase
48+
class TestLDAPConnectionErrors < Minitest::Test
4949
def setup
5050
@tcp_socket = flexmock(:connection)
5151
@tcp_socket.should_receive(:write)
@@ -74,7 +74,7 @@ def test_no_error_on_success
7474
end
7575
end
7676

77-
class TestLDAPConnectionInstrumentation < Test::Unit::TestCase
77+
class TestLDAPConnectionInstrumentation < Minitest::Test
7878
def setup
7979
@tcp_socket = flexmock(:connection)
8080
@tcp_socket.should_receive(:write)

test/test_ldif.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'digest/sha1'
66
require 'base64'
77

8-
class TestLdif < Test::Unit::TestCase
8+
class TestLdif < Minitest::Test
99
TestLdifFilename = "#{File.dirname(__FILE__)}/testdata.ldif"
1010

1111
def test_empty_ldif

test/test_password.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require_relative '../test_helper'
44

5-
class TestPassword < Test::Unit::TestCase
5+
class TestPassword < Minitest::Test
66

77
def test_psw
88
assert_equal(

test/test_rename.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Commented out since it assumes you have a live LDAP server somewhere. This
44
# will be migrated to the integration specs, as soon as they are ready.
55
=begin
6-
class TestRename < Test::Unit::TestCase
6+
class TestRename < Minitest::Test
77
HOST= '10.10.10.71'
88
PORT = 389
99
BASE = "o=test"

test/test_search.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- ruby encoding: utf-8 -*-
22
require_relative '../test_helper'
33

4-
class TestSearch < Test::Unit::TestCase
4+
class TestSearch < Minitest::Test
55
class FakeConnection
66
def search(args)
77
OpenStruct.new(:result_code => 1, :message => "error", :success? => false)

test/test_snmp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_relative '../test_helper'
44
require 'net/snmp'
55

6-
class TestSnmp < Test::Unit::TestCase
6+
class TestSnmp < Minitest::Test
77
def self.raw_string(s)
88
# Conveniently, String#b only needs to be called when it exists
99
s.respond_to?(:b) ? s.b : s

test/test_ssl_ber.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require_relative '../test_helper'
22
require 'timeout'
33

4-
class TestSSLBER < Test::Unit::TestCase
4+
class TestSSLBER < Minitest::Test
55
# Transmits str to @to and reads it back from @from.
66
#
77
def transmit(str)

0 commit comments

Comments
 (0)