ZenTest 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Binary file
data/.autotest CHANGED
@@ -9,6 +9,10 @@ Autotest.add_hook :initialize do |at|
9
9
 
10
10
  at.libs << ':../../minitest/dev/lib'
11
11
  at.testlib = "minitest/autorun"
12
+
13
+ %w(TestZenTest).each do |klass|
14
+ at.extra_class_map[klass] = "test/test_zentest.rb"
15
+ end
12
16
  end
13
17
 
14
18
  Autotest.add_hook :all_good do |at|
@@ -1,3 +1,25 @@
1
+ === 4.1.0 / 2009-06-03
2
+
3
+ * 1 major enhancement:
4
+
5
+ * Removed all plugins I don't want to maintain anymore. (gem inst autotest-rails)
6
+
7
+ * 4 minor enhancements:
8
+
9
+ * Added #blur to focus.rb to nuke all other test classes
10
+ * Clear RUBYOPT before installs (balatero)
11
+ * Removed test/unit include in zentest so we can focus on miniunit
12
+ * sort versions for builds. (Jens Wille)
13
+
14
+ * 6 bug fixes:
15
+
16
+ * Fixed a stupid bug when running on some versions of bash >= 3.2.x and using '&>' in a system call. (Jens Wille)
17
+ * Fixed inconsistent test commands in autotest. (jbarnette)
18
+ * Fixed unit_diff's usage generation when installed as gem. (borior)
19
+ * Fixed zentest to deal with unnamed classes. (Bill Dortch)
20
+ * Removed buggy/unused -l support in unit_diff. (borior)
21
+ * make twice to make it more resilient to makefile parallel bugs
22
+
1
23
  === 4.0.0 / 2009-03-02
2
24
 
3
25
  * 2 minor enhancements:
@@ -18,28 +18,9 @@ example2.rb
18
18
  example_dot_autotest.rb
19
19
  lib/autotest.rb
20
20
  lib/autotest/autoupdate.rb
21
- lib/autotest/camping.rb
22
- lib/autotest/cctray.rb
23
- lib/autotest/discover.rb
24
- lib/autotest/emacs.rb
25
- lib/autotest/email_notify.rb
26
- lib/autotest/fixtures.rb
27
- lib/autotest/growl.rb
28
- lib/autotest/heckle.rb
29
- lib/autotest/html_report.rb
30
- lib/autotest/jabber_notify.rb
31
- lib/autotest/kdenotify.rb
32
- lib/autotest/menu.rb
33
- lib/autotest/migrate.rb
34
- lib/autotest/notify.rb
35
21
  lib/autotest/once.rb
36
- lib/autotest/pretty.rb
37
- lib/autotest/rails.rb
38
22
  lib/autotest/rcov.rb
39
- lib/autotest/redgreen.rb
40
23
  lib/autotest/restart.rb
41
- lib/autotest/shame.rb
42
- lib/autotest/snarl.rb
43
24
  lib/autotest/timestamp.rb
44
25
  lib/focus.rb
45
26
  lib/functional_test_matrix.rb
data/README.txt CHANGED
@@ -6,12 +6,13 @@
6
6
 
7
7
  == DESCRIPTION
8
8
 
9
- ZenTest provides 4 different tools and 1 library: zentest, unit_diff,
10
- autotest, multiruby, and Test::Rails.
9
+ ZenTest provides 4 different tools: zentest, unit_diff, autotest, and
10
+ multiruby.
11
11
 
12
12
  ZenTest scans your target and unit-test code and writes your missing
13
13
  code based on simple naming rules, enabling XP at a much quicker
14
- pace. ZenTest only works with Ruby and Test::Unit.
14
+ pace. ZenTest only works with Ruby and Test::Unit. Nobody uses this
15
+ tool anymore but it is the package namesake, so it stays.
15
16
 
16
17
  unit_diff is a command-line filter to diff expected results from
17
18
  actual results and allow you to quickly see exactly what is wrong.
@@ -24,8 +25,6 @@ multiruby runs anything you want on multiple versions of ruby. Great
24
25
  for compatibility checking! Use multiruby_setup to manage your
25
26
  installed versions.
26
27
 
27
- Test::Rails helps you build industrial-strength Rails code.
28
-
29
28
  == STRATEGERY
30
29
 
31
30
  There are two strategeries intended for ZenTest: test conformance
@@ -43,7 +42,7 @@ implementation.
43
42
  == FEATURES
44
43
 
45
44
  * Scans your ruby code and tests and generates missing methods for you.
46
- * Includes a very helpful filter for Test::Unit output called unit_diff.
45
+ * Includes a very helpful filter for Test/Spec output called unit_diff.
47
46
  * Continually and intelligently test only those files you change with autotest.
48
47
  * Test against multiple versions with multiruby.
49
48
  * Enhance and automatically audit your rails tests using Test::Rails.
@@ -67,7 +66,7 @@ implementation.
67
66
  == REQUIREMENTS
68
67
 
69
68
  * Ruby 1.6+, JRuby 1.1.2+, or rubinius
70
- * Test::Unit or miniunit
69
+ * Test::Unit or miniunit (or something else ... I have no idea)
71
70
  * Hoe
72
71
  * rubygems
73
72
  * diff.exe on windoze. Try http://gnuwin32.sourceforge.net/packages.html
data/Rakefile CHANGED
@@ -9,11 +9,11 @@ Hoe.add_include_dirs("../../minitest/dev/lib")
9
9
 
10
10
  require './lib/zentest.rb'
11
11
 
12
- Hoe.new("ZenTest", ZenTest::VERSION) do |zentest|
13
- zentest.developer('Ryan Davis', 'ryand-ruby@zenspider.com')
14
- zentest.developer('Eric Hodel', 'drbrain@segment7.net')
12
+ Hoe.spec "ZenTest" do
13
+ developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
14
+ developer 'Eric Hodel', 'drbrain@segment7.net'
15
15
 
16
- zentest.testlib = :minitest
16
+ self.testlib = :minitest
17
17
  end
18
18
 
19
19
  task :autotest do
@@ -57,17 +57,5 @@ task :sort do
57
57
  end
58
58
  end
59
59
 
60
- task :rcov_info do
61
- ruby "-Ilib -S rcov --text-report --save coverage.info test/test_*.rb"
62
- end
63
-
64
- task :rcov_overlay do
65
- rcov, eol = Marshal.load(File.read("coverage.info")).last[ENV["FILE"]], 1
66
- puts rcov[:lines].zip(rcov[:coverage]).map { |line, coverage|
67
- bol, eol = eol, eol + line.length
68
- [bol, eol, "#ffcccc"] unless coverage
69
- }.compact.inspect
70
- end
71
-
72
60
  # vim:syntax=ruby
73
61
 
@@ -10,7 +10,6 @@
10
10
  # -c contextual diff
11
11
  # -h show usage
12
12
  # -k keep temp diff files around
13
- # -l prefix line numbers on the diffs
14
13
  # -u unified diff
15
14
  # -v display version
16
15
 
@@ -25,7 +24,7 @@ if defined? $v then
25
24
  end
26
25
 
27
26
  if defined? $h then
28
- File.open($0) do |f|
27
+ File.open(__FILE__) do |f|
29
28
  begin; end until f.readline =~ /usage:/
30
29
  f.readline
31
30
  while line = f.readline and line.sub!(/^# ?/, '')
@@ -1,45 +1,12 @@
1
1
  # -*- ruby -*-
2
2
 
3
3
  # require 'autotest/autoupdate'
4
- # require 'autotest/camping'
5
- # require 'autotest/cctray'
6
- # require 'autotest/emacs'
7
- # require 'autotest/email_notify'
8
- # require 'autotest/fixtures'
9
- # require 'autotest/growl'
10
- # require 'autotest/heckle'
11
- # require 'autotest/html_report'
12
- # require 'autotest/jabber_notify'
13
- # require 'autotest/kdenotify'
14
- # require 'autotest/menu'
15
- # require 'autotest/migrate'
16
- # require 'autotest/notify'
17
4
  # require 'autotest/once'
18
- # require 'autotest/pretty'
19
5
  # require 'autotest/rcov'
20
- # require 'autotest/redgreen'
21
6
  # require 'autotest/restart'
22
- # require 'autotest/screen'
23
- # require 'autotest/shame'
24
- # require 'autotest/snarl'
25
7
  # require 'autotest/timestamp'
26
8
 
27
9
  # Autotest::AutoUpdate.sleep_time = o
28
10
  # Autotest::AutoUpdate.update_cmd = o
29
- # Autotest::CCTray.project_name = name
30
- # Autotest::Emacs.command = o
31
- # Autotest::EmailNotify.smtp_settings = o
32
- # Autotest::EmailNotify.from = o
33
- # Autotest::EmailNotify.recipients = o
34
- # Autotest::EmailNotify.use_svn = o
35
- # Autotest::EmailNotify.report_every_run = o
36
- # Autotest::Growl.growl title, msg, pri = 0, img = nil
37
- # Autotest::JabberNotify.recipients = o
38
- # Autotest::JabberNotify.account = o
39
- # Autotest::JabberNotify.password = o
40
- # Autotest::JabberNotify.use_svn = o
41
- # Autotest::JabberNotify.report_every_run = o
42
11
  # Autotest::RCov.command = o
43
12
  # Autotest::RCov.pattern = o
44
- # Autotest::Shame.chat_app = o
45
- # Autotest::Snarl.snarl title, msg, ico = nil
@@ -430,16 +430,17 @@ class Autotest
430
430
  def make_test_cmd files_to_test
431
431
  cmds = []
432
432
  full, partial = reorder(files_to_test).partition { |k,v| v.empty? }
433
+ base_cmd = "#{ruby} -I#{libs} -rubygems"
433
434
 
434
435
  unless full.empty? then
435
436
  classes = full.map {|k,v| k}.flatten.uniq
436
437
  classes.unshift testlib
437
- cmds << "#{ruby} -I#{libs} -rubygems -e \"%w[#{classes.join(' ')}].each { |f| require f }\" | #{unit_diff}"
438
+ cmds << "#{base_cmd} -e \"%w[#{classes.join(' ')}].each { |f| require f }\" | #{unit_diff}"
438
439
  end
439
440
 
440
441
  partial.each do |klass, methods|
441
442
  regexp = Regexp.union(*methods).source
442
- cmds << "#{ruby} -I#{libs} #{klass} -n \"/^(#{regexp})$/\" | #{unit_diff}"
443
+ cmds << "#{base_cmd} #{klass} -n \"/^(#{regexp})$/\" | #{unit_diff}"
443
444
  end
444
445
 
445
446
  return cmds.join("#{SEP} ")
@@ -6,4 +6,16 @@ class Module
6
6
  remove_method unwanted
7
7
  end
8
8
  end
9
+
10
+ def blur
11
+ parent = self.superclass
12
+
13
+ ObjectSpace.each_object Class do |klass|
14
+ next unless parent > klass
15
+ next if klass == self
16
+
17
+ klass.send :focus
18
+ klass.send :undef_method, :default_test
19
+ end
20
+ end
9
21
  end
@@ -38,6 +38,8 @@ require 'open-uri'
38
38
  # RUBY_URL = url for MRI tarballs
39
39
  # VERSIONS = what versions to install
40
40
  #
41
+ # RUBYOPT is cleared on installs.
42
+ #
41
43
  # NOTES:
42
44
  #
43
45
  # * you can add a symlink to your rubinius build into ~/.multiruby/install
@@ -63,6 +65,8 @@ module Multiruby
63
65
  end
64
66
 
65
67
  def self.build_and_install
68
+ ENV.delete 'RUBYOPT'
69
+
66
70
  root_dir = self.root_dir
67
71
  versions = []
68
72
 
@@ -74,7 +78,7 @@ module Multiruby
74
78
  rubygem_tarball = File.expand_path rubygems.last rescue nil
75
79
 
76
80
  Dir.chdir "build" do
77
- Dir["../versions/*"].each do |tarball|
81
+ Dir["../versions/*"].sort.each do |tarball|
78
82
  next if tarball =~ /rubygems/
79
83
 
80
84
  build_dir = File.basename tarball, ".tar.gz"
@@ -108,7 +112,7 @@ module Multiruby
108
112
  run "tar zxf #{rubygem_tarball}" unless test ?d, rubygems
109
113
 
110
114
  Dir.chdir rubygems do
111
- run "../ruby ./setup.rb --no-rdoc --no-ri &> ../log.rubygems"
115
+ run "../ruby ./setup.rb --no-rdoc --no-ri", "../log.rubygems"
112
116
  end
113
117
  end
114
118
  end
@@ -189,9 +193,10 @@ module Multiruby
189
193
 
190
194
  def self.gnu_utils_build inst_dir
191
195
  run "autoconf" unless test ?f, "configure"
192
- run "./configure --prefix #{inst_dir} &> log.configure" unless test ?f, "Makefile"
193
- run "nice make -j4 &> log.build"
194
- run "make install &> log.install"
196
+ run "./configure --prefix #{inst_dir}", "log.configure" unless
197
+ test ?f, "Makefile"
198
+ run "(nice make -j4; nice make)", "log.build"
199
+ run "make install", "log.install"
195
200
  end
196
201
 
197
202
  def self.help
@@ -257,7 +262,7 @@ module Multiruby
257
262
  end
258
263
 
259
264
  def self.rake_build inst_dir
260
- run "rake &> log.build"
265
+ run "rake", "log.build"
261
266
  FileUtils.ln_sf "../build/#{File.basename Dir.pwd}", inst_dir
262
267
  end
263
268
 
@@ -289,7 +294,8 @@ module Multiruby
289
294
  root_dir
290
295
  end
291
296
 
292
- def self.run cmd
297
+ def self.run base_cmd, log
298
+ cmd = "#{base_cmd} > #{log} 2>&1"
293
299
  puts "Running command: #{cmd}"
294
300
  raise "ERROR: Command failed with exit code #{$?}" unless system cmd
295
301
  end
@@ -177,7 +177,6 @@ class UnitDiff
177
177
  $b = false unless defined? $b
178
178
  $c = false unless defined? $c
179
179
  $k = false unless defined? $k
180
- $l = false unless defined? $l
181
180
  $u = false unless defined? $u
182
181
 
183
182
  data, footer = self.parse_input(input, output)
@@ -249,7 +248,7 @@ class UnitDiff
249
248
  end
250
249
 
251
250
  def massage(data)
252
- data = data.map { |l| '%3d) %s' % [count+=1, l] } if $l
251
+ count = 0
253
252
  # unescape newlines, strip <> from entire string
254
253
  data = data.join
255
254
  data = data.gsub(/\\n/, "\n").gsub(/0x[a-f0-9]+/m, '0xXXXXXX') + "\n"
@@ -1,8 +1,10 @@
1
1
 
2
- require 'zentest_mapping'
3
-
4
2
  $stdlib = {}
5
- ObjectSpace.each_object(Module) { |m| $stdlib[m.name] = true }
3
+ ObjectSpace.each_object(Module) do |m|
4
+ $stdlib[m.name] = true if m.respond_to? :name
5
+ end
6
+
7
+ require 'zentest_mapping'
6
8
 
7
9
  $:.unshift( *$I.split(/:/) ) if defined? $I and String === $I
8
10
  $r = false unless defined? $r # reverse mapping for testclass names
@@ -17,7 +19,6 @@ if $r then
17
19
  require f if test ?f, f
18
20
  end
19
21
 
20
- $ZENTEST = true
21
22
  $TESTING = true
22
23
 
23
24
  class Module
@@ -52,7 +53,7 @@ end
52
53
 
53
54
  class ZenTest
54
55
 
55
- VERSION = '4.0.0'
56
+ VERSION = '4.1.0'
56
57
 
57
58
  include ZenTestMapping
58
59
 
@@ -475,7 +476,8 @@ class ZenTest
475
476
 
476
477
  if @missing_methods.size > 0 then
477
478
  @result.push ""
478
- @result.push "require 'test/unit' unless defined? $ZENTEST and $ZENTEST"
479
+ @result.push "require 'test/unit/testcase'"
480
+ @result.push "require 'test/unit' if $0 == __FILE__"
479
481
  @result.push ""
480
482
  end
481
483
 
@@ -359,7 +359,7 @@ test_error2(#{@test_class}):
359
359
  }
360
360
 
361
361
  expected = [ "#{RUBY} -I.:lib:test -rubygems -e \"%w[test/unit #{@test}].each { |f| require f }\" | unit_diff -u",
362
- "#{RUBY} -I.:lib:test test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" | unit_diff -u" ].join("; ")
362
+ "#{RUBY} -I.:lib:test -rubygems test/test_fooby.rb -n \"/^(test_something1|test_something2)$/\" | unit_diff -u" ].join("; ")
363
363
 
364
364
  result = @a.make_test_cmd f
365
365
  assert_equal expected, result
@@ -174,7 +174,8 @@ class TestZenTest < MiniTest::Unit::TestCase
174
174
  }
175
175
  @tester.inherited_methods = @tester.test_klasses.merge(@tester.klasses)
176
176
  @generated_code = "
177
- require 'test/unit' unless defined? $ZENTEST and $ZENTEST
177
+ require 'test/unit/testcase'
178
+ require 'test/unit' if $0 == __FILE__
178
179
 
179
180
  class Something
180
181
  def self.method4(*args)
@@ -418,10 +419,10 @@ end
418
419
 
419
420
  def test_get_methods_for_subclass_full
420
421
  expect = {
421
- "self.cls_inherited" => true,
422
+ "self.cls_inherited" => true,
422
423
  "self.cls_extended" => true,
423
424
  "overridden" => true,
424
- "extended" => true
425
+ "extended" => true
425
426
  }
426
427
  result = @tester.get_methods_for("LowlyOne", true)
427
428
 
@@ -440,7 +441,7 @@ end
440
441
 
441
442
  def test_result
442
443
  self.util_simple_setup
443
-
444
+
444
445
  @tester.analyze
445
446
  @tester.generate_code
446
447
  str = @tester.result.split($/, 2).last
@@ -504,50 +505,52 @@ end
504
505
  assert_equal expected, util_testcase("Blah0", "TestBlah0")
505
506
  end
506
507
 
508
+ HEADER = "\nrequire 'test/unit/testcase'\nrequire 'test/unit' if $0 == __FILE__\n\n"
509
+
507
510
  def test_testcase1
508
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nclass Blah1\n def missingimpl(*args)\n raise NotImplementedError, 'Need to write missingimpl'\n end\nend\n\nclass TestBlah1 < Test::Unit::TestCase\n def test_missingtest\n raise NotImplementedError, 'Need to write test_missingtest'\n end\nend\n\n# Number of errors detected: 2"
511
+ expected = "#{HEADER}class Blah1\n def missingimpl(*args)\n raise NotImplementedError, 'Need to write missingimpl'\n end\nend\n\nclass TestBlah1 < Test::Unit::TestCase\n def test_missingtest\n raise NotImplementedError, 'Need to write test_missingtest'\n end\nend\n\n# Number of errors detected: 2"
509
512
 
510
513
  assert_equal expected, util_testcase("Blah1", "TestBlah1")
511
514
  end
512
515
 
513
516
  def test_testcase2
514
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nmodule Something2\n class Blah2\n def missingimpl(*args)\n raise NotImplementedError, 'Need to write missingimpl'\n end\n end\nend\n\nmodule TestSomething2\n class TestBlah2 < Test::Unit::TestCase\n def test_missingtest\n raise NotImplementedError, 'Need to write test_missingtest'\n end\n end\nend\n\n# Number of errors detected: 2"
517
+ expected = "#{HEADER}module Something2\n class Blah2\n def missingimpl(*args)\n raise NotImplementedError, 'Need to write missingimpl'\n end\n end\nend\n\nmodule TestSomething2\n class TestBlah2 < Test::Unit::TestCase\n def test_missingtest\n raise NotImplementedError, 'Need to write test_missingtest'\n end\n end\nend\n\n# Number of errors detected: 2"
515
518
 
516
519
  assert_equal expected, util_testcase("Something2::Blah2", "TestSomething2::TestBlah2")
517
520
  end
518
521
 
519
522
  def test_testcase3
520
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nclass Blah3\n def missingimpl(*args)\n raise NotImplementedError, 'Need to write missingimpl'\n end\nend\n\n# Number of errors detected: 1"
523
+ expected = "#{HEADER}class Blah3\n def missingimpl(*args)\n raise NotImplementedError, 'Need to write missingimpl'\n end\nend\n\n# Number of errors detected: 1"
521
524
 
522
525
  assert_equal expected, util_testcase("TestBlah3")
523
526
  end
524
527
 
525
528
  def test_testcase4
526
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nclass TestBlah4 < Test::Unit::TestCase\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\n\n def test_missingtest2\n raise NotImplementedError, 'Need to write test_missingtest2'\n end\nend\n\n# Number of errors detected: 3"
529
+ expected = "#{HEADER}class TestBlah4 < Test::Unit::TestCase\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\n\n def test_missingtest2\n raise NotImplementedError, 'Need to write test_missingtest2'\n end\nend\n\n# Number of errors detected: 3"
527
530
 
528
531
  assert_equal expected, util_testcase("Blah4")
529
532
  end
530
533
 
531
534
  def test_testcase5
532
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nclass TestMyHash5 < Test::Unit::TestCase\n def test_index\n raise NotImplementedError, 'Need to write test_index'\n end\n\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\nend\n\n# Number of errors detected: 3"
535
+ expected = "#{HEADER}class TestMyHash5 < Test::Unit::TestCase\n def test_index\n raise NotImplementedError, 'Need to write test_index'\n end\n\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\nend\n\n# Number of errors detected: 3"
533
536
 
534
537
  assert_equal expected, util_testcase("MyHash5")
535
538
  end
536
539
 
537
540
  def test_testcase6
538
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nmodule TestMyModule6\n class TestMyClass6 < Test::Unit::TestCase\n def test_index\n raise NotImplementedError, 'Need to write test_index'\n end\n\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\n end\nend\n\n# Number of errors detected: 3"
541
+ expected = "#{HEADER}module TestMyModule6\n class TestMyClass6 < Test::Unit::TestCase\n def test_index\n raise NotImplementedError, 'Need to write test_index'\n end\n\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\n end\nend\n\n# Number of errors detected: 3"
539
542
 
540
543
  assert_equal expected, util_testcase("MyModule6::MyClass6")
541
544
  end
542
545
 
543
546
  def test_testcase7
544
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nmodule TestMyModule7\n class TestMyClass7 < Test::Unit::TestCase\n def test_index\n raise NotImplementedError, 'Need to write test_index'\n end\n\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\n end\nend\n\n# Number of errors detected: 3"
547
+ expected = "#{HEADER}module TestMyModule7\n class TestMyClass7 < Test::Unit::TestCase\n def test_index\n raise NotImplementedError, 'Need to write test_index'\n end\n\n def test_missingtest1\n raise NotImplementedError, 'Need to write test_missingtest1'\n end\n end\nend\n\n# Number of errors detected: 3"
545
548
 
546
549
  assert_equal expected, util_testcase("MyModule7::MyClass7")
547
550
  end
548
551
 
549
552
  def test_testcase8
550
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nclass TestMyClass8 < Test::Unit::TestCase\n def test_class_foobar\n raise NotImplementedError, 'Need to write test_class_foobar'\n end\n\n def test_class_foobaz\n raise NotImplementedError, 'Need to write test_class_foobaz'\n end\nend\n\n# Number of errors detected: 3"
553
+ expected = "#{HEADER}class TestMyClass8 < Test::Unit::TestCase\n def test_class_foobar\n raise NotImplementedError, 'Need to write test_class_foobar'\n end\n\n def test_class_foobaz\n raise NotImplementedError, 'Need to write test_class_foobaz'\n end\nend\n\n# Number of errors detected: 3"
551
554
 
552
555
  assert_equal expected, util_testcase("MyClass8")
553
556
  end
@@ -556,7 +559,7 @@ assert_equal expected, util_testcase("Something2::Blah2", "TestSomething2::TestB
556
559
  # stupid YAML is breaking my tests. Enters via Test::Rails. order dependent.
557
560
  TrueClass.send :remove_method, :taguri, :taguri=, :to_yaml if defined? YAML
558
561
 
559
- expected = "\nrequire 'test/unit' unless defined? $ZENTEST and $ZENTEST\n\nclass TestTrueClass < Test::Unit::TestCase\n def test_and\n raise NotImplementedError, 'Need to write test_and'\n end\n\n def test_carat\n raise NotImplementedError, 'Need to write test_carat'\n end\n\n def test_or\n raise NotImplementedError, 'Need to write test_or'\n end\n\n def test_to_s\n raise NotImplementedError, 'Need to write test_to_s'\n end\nend\n\n# Number of errors detected: 4"
562
+ expected = "#{HEADER}class TestTrueClass < Test::Unit::TestCase\n def test_and\n raise NotImplementedError, 'Need to write test_and'\n end\n\n def test_carat\n raise NotImplementedError, 'Need to write test_carat'\n end\n\n def test_or\n raise NotImplementedError, 'Need to write test_or'\n end\n\n def test_to_s\n raise NotImplementedError, 'Need to write test_to_s'\n end\nend\n\n# Number of errors detected: 4"
560
563
 
561
564
  assert_equal expected, util_testcase("TestTrueClass")
562
565
  end