riel 1.1.10 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/riel/dir.rb CHANGED
@@ -6,14 +6,16 @@ require 'pathname'
6
6
  class Dir
7
7
 
8
8
  # Returns the home directory, for both Unix and Windows.
9
- def self.home
10
- ENV["HOME"] || begin
11
- hd = ENV["HOMEDRIVE"]
12
- hp = ENV["HOMEPATH"]
13
- if hd || hp
14
- (hd || "") + (hp || "\\")
9
+ unless RUBY_VERSION.index('1.9')
10
+ def self.home
11
+ ENV["HOME"] || begin
12
+ hd = ENV["HOMEDRIVE"]
13
+ hp = ENV["HOMEPATH"]
14
+ if hd || hp
15
+ (hd || "") + (hp || "\\")
16
+ end
15
17
  end
16
- end
18
+ end
17
19
  end
18
20
 
19
21
  # Removes directories containing no files or files matching only those in
data/lib/riel/io.rb CHANGED
@@ -6,7 +6,7 @@ require 'riel/file'
6
6
  class IO
7
7
  # Reads the stream into an array. It works even when $/ == nil, which
8
8
  # works around a problem in Ruby 1.8.1.
9
- if VERSION == "1.8.1"
9
+ if RUBY_VERSION == "1.8.1"
10
10
  $-w = false
11
11
 
12
12
  def readlines
data/lib/riel/optproc.rb CHANGED
@@ -302,7 +302,7 @@ module OptProc
302
302
  @bestopts[0].set_value args
303
303
  return @bestopts[0]
304
304
  else
305
- optstr = @bestopts.collect { |x| '(' + x.tags.join(', ') + ')' }.join(', ')
305
+ optstr = @bestopts.collect { |y| '(' + y.tags.join(', ') + ')' }.join(', ')
306
306
  $stderr.puts "ERROR: ambiguous match of '#{args[0]}'; matches options: #{optstr}"
307
307
  exit 2
308
308
  end
data/lib/riel/pathname.rb CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'pathname'
5
5
  require 'riel/string'
6
- require 'ftools'
6
+ require 'fileutils'
7
7
 
8
8
  class Pathname
9
9
 
data/lib/riel/text.rb CHANGED
@@ -226,6 +226,7 @@ module Text
226
226
  # Returns the escape sequence for the given names.
227
227
  def names_to_code names
228
228
  str = ""
229
+ names = [ names ] unless names.kind_of? Array
229
230
  names.each do |name|
230
231
  code = ATTRIBUTES[name]
231
232
  if code
@@ -296,6 +297,8 @@ module Text
296
297
  def names_to_code names
297
298
  str = ""
298
299
 
300
+ names = [ names ] unless names.kind_of? Array
301
+
299
302
  names.each do |name|
300
303
  @stack << name
301
304
 
data/lib/riel.rb CHANGED
@@ -4,7 +4,7 @@ $:.unshift(riellibdir) unless
4
4
  $:.include?(riellibdir) || $:.include?(File.expand_path(riellibdir))
5
5
 
6
6
  module RIEL
7
- VERSION = '1.1.10'
7
+ VERSION = '1.1.11'
8
8
  end
9
9
 
10
10
  rbfiles = Dir[riellibdir + "/riel/**/*.rb"]
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/array'
6
6
 
7
- class ArrayTestCase < RUNIT::TestCase
7
+ class ArrayTestCase < Test::Unit::TestCase
8
8
 
9
9
  def test_to_s
10
10
  a = %w{ this is a test }
@@ -1,11 +1,10 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/command'
6
6
 
7
- class CommandTestCase < RUNIT::TestCase
8
-
7
+ class CommandTestCase < Test::Unit::TestCase
9
8
  def test_all
10
9
  assert_equal [ "/bin/ls\n" ], Command.run("ls", "/bin/ls")
11
10
  assert_equal [ "/bin/grep\n", "/bin/ls\n" ], Command.run("ls", "/bin/ls", "/bin/grep" )
@@ -13,16 +12,15 @@ class CommandTestCase < RUNIT::TestCase
13
12
  lnum = 0
14
13
  expected = [ "/bin/grep\n", "/bin/ls\n" ]
15
14
  lines = Command.run("ls", "/bin/ls", "/bin/grep" ) do |line|
16
- assert_equals(expected[lnum], line)
15
+ assert_equal expected[lnum], line
17
16
  lnum += 1
18
17
  end
19
18
  assert_equal expected, lines
20
19
 
21
20
  expected = [ "/bin/grep\n", "/bin/ls\n" ]
22
- lines = Command.run("ls", "/bin/ls", "/bin/grep" ) do |line, lnum|
23
- assert_equals(expected[lnum], line)
21
+ lines = Command.run("ls", "/bin/ls", "/bin/grep" ) do |line, ln|
22
+ assert_equal expected[ln], line
24
23
  end
25
24
  assert_equal expected, lines
26
25
  end
27
-
28
26
  end
@@ -1,17 +1,15 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/date'
6
6
 
7
- class DateTestCase < RUNIT::TestCase
8
-
9
- def test
7
+ class DateTestCase < Test::Unit::TestCase
8
+ def test_simple
10
9
  assert_equal 28, Date.days_in_month(2010, 2)
11
10
  assert_equal 31, Date.days_in_month(2010, 1)
12
11
  assert_equal 29, Date.days_in_month(2008, 2)
13
12
  assert_equal 30, Date.days_in_month(2007, 6)
14
13
  assert_equal 31, Date.days_in_month(2010, 12)
15
14
  end
16
-
17
15
  end
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'pathname'
6
6
  require 'riel/dir'
7
7
  require 'riel/file'
8
8
 
9
- class DirTestCase < RUNIT::TestCase
10
-
9
+ class DirTestCase < Test::Unit::TestCase
11
10
  def test_home
12
11
  assert_equal ENV["HOME"], Dir.home
13
12
  end
@@ -15,7 +14,7 @@ class DirTestCase < RUNIT::TestCase
15
14
  def test_remove_if_empty
16
15
  # set up a mess of files in /tmp ...
17
16
 
18
- tmpdir = Pathname.new('/tmp')
17
+ tmpdir = Pathname.new '/tmp'
19
18
 
20
19
  # maybe this isn't Linux (poor devils!):
21
20
  return unless tmpdir.exist?
@@ -46,7 +45,7 @@ class DirTestCase < RUNIT::TestCase
46
45
  adir.mkdir
47
46
  end
48
47
 
49
- Dir.remove_if_empty(a, :verbose => false)
48
+ Dir.remove_if_empty a, :verbose => false
50
49
 
51
50
  assert !a.exist?
52
51
 
@@ -65,7 +64,7 @@ class DirTestCase < RUNIT::TestCase
65
64
  end
66
65
  end
67
66
 
68
- Dir.remove_if_empty(a)
67
+ Dir.remove_if_empty a
69
68
  assert a.exist?
70
69
 
71
70
  Dir.remove_if_empty(a, :deletable => [ %r{aa\d+} ])
@@ -87,10 +86,10 @@ class DirTestCase < RUNIT::TestCase
87
86
  end
88
87
  end
89
88
 
90
- Dir.remove_if_empty(a)
89
+ Dir.remove_if_empty a
91
90
  assert a.exist?
92
91
 
93
- Dir.remove_if_empty(a, :deletable => %w{ foo.bar })
92
+ Dir.remove_if_empty a, :deletable => %w{ foo.bar }
94
93
  assert !a.exist?
95
94
 
96
95
  testdir.delete
@@ -1,27 +1,24 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'pathname'
5
- require 'rubyunit'
4
+ require 'test/unit'
6
5
  require 'riel/enumerable'
7
6
 
8
- class EnumerableTestCase < RUNIT::TestCase
9
-
7
+ class EnumerableTestCase < Test::Unit::TestCase
10
8
  def test_collect_with_index
11
- assert_equals([ 0, 5, 12, 21, 32 ], (4 .. 8).collect_with_index { |val, idx| val * idx })
12
- assert_equals([ "", "b", "cc", "ddd" ], ('a' .. 'd').collect_with_index { |str, idx| str * idx })
9
+ assert_equal [ 0, 5, 12, 21, 32 ], (4 .. 8).collect_with_index { |val, idx| val * idx }
10
+ assert_equal [ "", "b", "cc", "ddd" ], ('a' .. 'd').collect_with_index { |str, idx| str * idx }
13
11
  end
14
12
 
15
13
  def test_select_with_index
16
- assert_equals([ 5, 6, 7, 8 ], (4 .. 8).select_with_index { |val, idx| val >= 5 })
17
- assert_equals([ 6 ], (4 .. 8).select_with_index { |val, idx| val * idx == 12 })
18
- assert_equals([], (4 .. 8).select_with_index { |val, idx| idx - val > 0 })
14
+ assert_equal [ 5, 6, 7, 8 ], (4 .. 8).select_with_index { |val, idx| val >= 5 }
15
+ assert_equal [ 6 ], (4 .. 8).select_with_index { |val, idx| val * idx == 12 }
16
+ assert_equal [], (4 .. 8).select_with_index { |val, idx| idx - val > 0 }
19
17
  end
20
18
 
21
19
  def test_detect_with_index
22
- assert_equals(5, (4 .. 8).detect_with_index { |val, idx| val >= 5 })
23
- assert_equals(6, (4 .. 8).detect_with_index { |val, idx| val * idx == 12 })
24
- assert_equals(nil, (4 .. 8).detect_with_index { |val, idx| idx - val > 0 })
20
+ assert_equal 5, (4 .. 8).detect_with_index { |val, idx| val >= 5 }
21
+ assert_equal 6, (4 .. 8).detect_with_index { |val, idx| val * idx == 12 }
22
+ assert_equal nil, (4 .. 8).detect_with_index { |val, idx| idx - val > 0 }
25
23
  end
26
-
27
24
  end
@@ -1,52 +1,48 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/env'
6
6
 
7
- class EnvTestCase < RUNIT::TestCase
8
-
7
+ class EnvTestCase < Test::Unit::TestCase
9
8
  def test_home_directory
10
9
  # Unix
11
10
 
12
11
  ENV["HOME"] = "/home/me"
13
12
 
14
- assert_equals "/home/me", Env.home_directory
13
+ assert_equal "/home/me", Env.home_directory
15
14
 
16
15
  # Windows
17
16
 
18
17
  ENV["HOME"] = nil
19
18
  ENV["HOMEDRIVE"] = "c:"
20
19
 
21
- assert_equals "c:\\", Env.home_directory
20
+ assert_equal "c:\\", Env.home_directory
22
21
 
23
22
  ENV["HOME"] = nil
24
23
  ENV["HOMEDRIVE"] = nil
25
24
  ENV["HOMEPATH"] = "\\Program Files\\User"
26
25
 
27
- assert_equals "\\Program Files\\User", Env.home_directory
26
+ assert_equal "\\Program Files\\User", Env.home_directory
28
27
 
29
28
  ENV["HOME"] = nil
30
29
  ENV["HOMEDRIVE"] = "c:"
31
30
  ENV["HOMEPATH"] = "\\Program Files\\User"
32
31
 
33
- # assert_equals "c:\\Program Files\\User", Env.home_directory
32
+ # assert_equal "c:\\Program Files\\User", Env.home_directory
34
33
  end
35
34
 
36
- def do_split_test(expected, input)
35
+ def run_split_test expected, input
37
36
  ENV["FOO"] = input
38
-
39
- result = Env.split("FOO")
40
-
41
- assert_equals expected, result
37
+ result = Env.split "FOO"
38
+ assert_equal expected, result
42
39
  end
43
40
 
44
41
  def test_split
45
- do_split_test(%w{ testing }, "testing")
46
- do_split_test(%w{ this is }, "this is")
47
- do_split_test(%w{ this is }, '"this" "is"')
48
- do_split_test(%w{ this is a test }, '"this" "is" \'a\' "test"')
49
- do_split_test(%w{ this is a tes't }, '"this" "is" \'a\' "tes\'t"')
42
+ run_split_test %w{ testing }, "testing"
43
+ run_split_test %w{ this is }, "this is"
44
+ run_split_test %w{ this is }, '"this" "is"'
45
+ run_split_test %w{ this is a test }, '"this" "is" \'a\' "test"'
46
+ run_split_test %w{ this is a tes't }, '"this" "is" \'a\' "tes\'t"'
50
47
  end
51
-
52
48
  end
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/file'
6
6
  require 'riel/tempfile'
7
7
  require 'pathname'
8
8
 
9
-
10
- class FileTestCase < RUNIT::TestCase
9
+ class FileTestCase < Test::Unit::TestCase
11
10
 
12
11
  def get_file_rootname
13
12
  Pathname.new(__FILE__).rootname
@@ -28,7 +27,7 @@ class FileTestCase < RUNIT::TestCase
28
27
 
29
28
  tempname = nil
30
29
 
31
- if File.exist?(stringio_so)
30
+ if File.exist? stringio_so
32
31
  rootname = Pathname.new(__FILE__).rootname
33
32
  tempname = Tempfile.open(rootname) do |tf|
34
33
  tf.write IO.read(stringio_so)
@@ -42,12 +41,12 @@ class FileTestCase < RUNIT::TestCase
42
41
 
43
42
  def test_file_types
44
43
  text_file = create_text_file
45
- assert(File.text?(text_file))
46
- assert(!File.binary?(text_file))
44
+ assert File.text?(text_file)
45
+ assert !File.binary?(text_file)
47
46
 
48
47
  if binary_file = create_binary_file
49
- assert(!File.text?(binary_file))
50
- assert(File.binary?(binary_file))
48
+ assert !File.text?(binary_file)
49
+ assert File.binary?(binary_file)
51
50
  end
52
51
  end
53
52
 
@@ -56,18 +55,17 @@ class FileTestCase < RUNIT::TestCase
56
55
 
57
56
  dir = Pathname.new(file).dirname
58
57
 
59
- assert(File.is_file?(file))
60
- assert(!File.is_file?(dir))
58
+ assert File.is_file?(file)
59
+ assert !File.is_file?(dir)
61
60
 
62
- assert(!File.is_directory?(file))
63
- assert(File.is_directory?(dir))
61
+ assert !File.is_directory?(file)
62
+ assert File.is_directory?(dir)
64
63
 
65
64
  # this should have access only by root:
66
65
 
67
66
  file = "/var/log/httpd/error_log"
68
- assert(!File.is_file?(file))
69
- assert(!File.is_directory?(file))
70
-
67
+ assert !File.is_file?(file)
68
+ assert !File.is_directory?(file)
71
69
  end
72
70
 
73
71
  def test_read_write_file
@@ -82,7 +80,7 @@ class FileTestCase < RUNIT::TestCase
82
80
  line = ln
83
81
  end
84
82
 
85
- assert_equal("hello, world", line)
83
+ assert_equal "hello, world", line
86
84
  end
87
85
 
88
86
  def test_read_put_file
@@ -97,7 +95,7 @@ class FileTestCase < RUNIT::TestCase
97
95
  line = ln
98
96
  end
99
97
 
100
- assert_equal("hello, world\n", line)
98
+ assert_equal "hello, world\n", line
101
99
 
102
100
  File.put_file(filename) do
103
101
  [
@@ -111,13 +109,13 @@ class FileTestCase < RUNIT::TestCase
111
109
  lines << ln
112
110
  end
113
111
 
114
- assert_equal([ "hello, world\n", "this is a test\n" ] , lines)
112
+ assert_equal [ "hello, world\n", "this is a test\n" ] , lines
115
113
  end
116
114
 
117
115
  def test_open_via_temp_file
118
116
  fname = "/tmp/test_open_via_temp_file.#{$$}"
119
117
 
120
- pn = Pathname.new(fname)
118
+ pn = Pathname.new fname
121
119
 
122
120
  assert !pn.exist?
123
121
 
@@ -166,13 +164,13 @@ class FileTestCase < RUNIT::TestCase
166
164
  assert file.exist?
167
165
  end
168
166
 
169
- File.move_files(tgt, srcfiles)
167
+ File.move_files tgt, srcfiles
170
168
 
171
- assert_files_existence(false, srcfiles)
169
+ assert_files_existence false, srcfiles
172
170
 
173
171
  tgtfiles = fnums.collect { |num| tgt + "movefile#{num}" }
174
172
 
175
- assert_files_existence(true, tgtfiles)
173
+ assert_files_existence true, tgtfiles
176
174
  ensure
177
175
  if tgt && tgt.exist?
178
176
  tgt.children.each do |child|
@@ -217,13 +215,13 @@ class FileTestCase < RUNIT::TestCase
217
215
  assert file.exist?
218
216
  end
219
217
 
220
- File.copy_files(tgt, srcfiles)
218
+ File.copy_files tgt, srcfiles
221
219
 
222
- assert_files_existence(true, srcfiles)
220
+ assert_files_existence true, srcfiles
223
221
 
224
222
  tgtfiles = fnums.collect { |num| tgt + "copyfile#{num}" }
225
223
 
226
- assert_files_existence(true, tgtfiles)
224
+ assert_files_existence true, tgtfiles
227
225
  ensure
228
226
  if tgt && tgt.exist?
229
227
  tgt.children.each do |child|
@@ -238,5 +236,4 @@ class FileTestCase < RUNIT::TestCase
238
236
  end
239
237
  end
240
238
  end
241
-
242
239
  end
@@ -1,32 +1,29 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/filetype'
6
6
 
7
-
8
- class FileTypeTestCase < RUNIT::TestCase
9
-
7
+ class FileTypeTestCase < Test::Unit::TestCase
10
8
  def test_default_extensions
11
9
  ft = FileType.instance
12
10
 
13
- assert(ft.text_extensions.include?("rb"))
11
+ assert ft.text_extensions.include?("rb")
14
12
 
15
- assert(!ft.text_extensions.include?("rbx"))
16
- assert(!ft.text_extensions.include?("tar"))
17
- assert(!ft.text_extensions.include?("jar"))
18
- assert(!ft.text_extensions.include?("gz"))
13
+ assert !ft.text_extensions.include?("rbx")
14
+ assert !ft.text_extensions.include?("tar")
15
+ assert !ft.text_extensions.include?("jar")
16
+ assert !ft.text_extensions.include?("gz")
19
17
 
20
- assert(ft.nontext_extensions.include?("tar"))
21
- assert(ft.nontext_extensions.include?("jar"))
22
- assert(ft.nontext_extensions.include?("gz"))
18
+ assert ft.nontext_extensions.include?("tar")
19
+ assert ft.nontext_extensions.include?("jar")
20
+ assert ft.nontext_extensions.include?("gz")
23
21
 
24
- ft.set_extensions(true, "rbx")
25
- assert(ft.text_extensions.include?("rbx"))
22
+ ft.set_extensions true, "rbx"
23
+ assert ft.text_extensions.include?("rbx")
26
24
 
27
- ft.set_extensions(true, "foo", "bar")
28
- assert(ft.text_extensions.include?("foo"))
29
- assert(ft.text_extensions.include?("bar"))
25
+ ft.set_extensions true, "foo", "bar"
26
+ assert ft.text_extensions.include?("foo")
27
+ assert ft.text_extensions.include?("bar")
30
28
  end
31
-
32
29
  end
@@ -1,12 +1,10 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/hash'
6
6
 
7
- class HashTestCase < RUNIT::TestCase
8
-
9
- def test
7
+ class HashTestCase < Test::Unit::TestCase
8
+ def test_nothing
10
9
  end
11
-
12
10
  end
@@ -8,11 +8,11 @@ module PVN
8
8
  def setup
9
9
  end
10
10
 
11
- def assert_true boolean, message = nil
11
+ def assert_true boolean, message = ""
12
12
  assert boolean, message
13
13
  end
14
14
 
15
- def assert_false boolean, message = nil
15
+ def assert_false boolean, message = ""
16
16
  assert !boolean, message
17
17
  end
18
18
 
data/test/riel/io_test.rb CHANGED
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/ruby -w
2
2
  # -*- ruby -*-
3
3
 
4
- require 'rubyunit'
4
+ require 'test/unit'
5
5
  require 'riel/io'
6
6
 
7
- class IOTestCase < RUNIT::TestCase
7
+ class IOTestCase < Test::Unit::TestCase
8
8
  def xtest_readlines
9
9
  orig = $/
10
10
 
11
11
  $/ = nil
12
12
 
13
- contents = IO.readlines(__FILE__)
13
+ contents = IO.readlines __FILE__
14
14
 
15
15
  assert_not_nil contents
16
16
  assert contents.size > 0
@@ -2,7 +2,7 @@
2
2
  # -*- ruby -*-
3
3
 
4
4
  require 'pathname'
5
- require 'rubyunit'
5
+ require 'test/unit'
6
6
  require 'stringio'
7
7
  require 'riel/log'
8
8
 
@@ -35,7 +35,7 @@ class LogInner
35
35
  end
36
36
  end
37
37
 
38
- class LogStackTestCase < RUNIT::TestCase
38
+ class LogStackTestCase < Test::Unit::TestCase
39
39
  include Loggable
40
40
 
41
41
  def test_stack
@@ -53,37 +53,13 @@ class LogStackTestCase < RUNIT::TestCase
53
53
  "[ ...: 14] {LogAbyss#squeal } turtles all the way down",
54
54
  "[ ...: 24] {speak } ",
55
55
  "[ ...: 34] {screech } ",
56
- "[ ...: 46] {test_stack } ",
57
- "[ ...: 104] {call } ",
58
- "[ ...: 104] {run_test } ",
59
- "[ ...: 82] {test_stack } ",
60
- "[ ...testcase.rb: 78] {__send__ } ",
61
- "[ ...testcase.rb: 78] {run } ",
62
- "[ ...testcase.rb: 42] {run } ",
63
- "[...testsuite.rb: 34] {run } ",
64
- "[...testsuite.rb: 33] {each } ",
65
- "[...testsuite.rb: 33] {run } ",
66
- "[...testsuite.rb: 23] {run } ",
67
- "[...testsuite.rb: 34] {run } ",
68
- "[...testsuite.rb: 33] {each } ",
69
- "[...testsuite.rb: 33] {run } ",
70
- "[ ...: 46] {run_suite } ",
71
- "[ ...: 67] {start_mediator } ",
72
- "[ ...: 41] {start } ",
73
- "[ ...: 29] {run } ",
74
- "[ ...: 216] {run } ",
75
- "[ ...: 12] {run } ",
76
- # nil means to ignore these lines, which in this case is
77
- # because this is deep in the unit test code:
78
- nil,
79
- nil,
80
56
  ]
81
57
 
82
58
  run_test @verbose_setup, log, *expected_output
83
59
  end
84
60
 
85
61
  # the ctor is down here so the lines above are less likely to change.
86
- def initialize test, name
62
+ def initialize test, name = nil
87
63
  @nonverbose_setup = Proc.new {
88
64
  Log.verbose = false
89
65
  Log.output = StringIO.new
@@ -94,7 +70,7 @@ class LogStackTestCase < RUNIT::TestCase
94
70
  Log.output = StringIO.new
95
71
  }
96
72
 
97
- super
73
+ super test
98
74
  end
99
75
 
100
76
  def run_test setup, log, *expected
@@ -111,11 +87,9 @@ class LogStackTestCase < RUNIT::TestCase
111
87
 
112
88
  puts lines
113
89
 
114
- assert_equals expected.size, lines.size, "number of lines of output"
115
-
116
90
  (0 ... expected.size).each do |idx|
117
91
  if expected[idx]
118
- assert_equals expected[idx], lines[idx], "index: #{idx}"
92
+ assert_equal expected[idx], lines[idx], "index: #{idx}"
119
93
  end
120
94
  end
121
95