Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated History for 3.0 release.

Added install and uninstall rules to Rakefile, minor cleanup.
Improved rails compatibility and output for ZenTest.
Minor cleanup on test_railsautotest.

[git-p4: depot-paths = "//src/ZenTest/dev/": change = 2354]
  • Loading branch information...
commit 8d085def58b6f497262a66fb21f7514417292042 1 parent d0d5aaf
@zenspider zenspider authored
Showing with 58 additions and 11 deletions.
  1. +13 −0 History.txt
  2. +35 −4 Rakefile
  3. +7 −1 lib/ZenTest.rb
  4. +3 −6 test/test_autotest.rb
View
13 History.txt
@@ -1,3 +1,16 @@
+*** 3.0.0 / 2006-02-24
+
++ 2 major enhancements
+ + Added autotest and rails_autotest. YAY for continous testing!
+ + Repackaged and gemified. YAY for gemification!
++ 3 minor enhancements
+ + Added non-mappable tests starting with test_integration_.
+ + Lots of code and test refactoring and cleanup.
+ + Massive improvement on unit tests.
++ 2 bug fixes
+ + Finally fixed the unit_diff parse bug!
+ + Fixed improper counting of errors if a class was missing, should be 1 + missing methods.
+
*** 2.4.0 / 2005-03-21
+ 3 minor enhancements
View
39 Rakefile
@@ -1,8 +1,12 @@
+# -*- ruby -*-
+
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
+require 'rbconfig'
+$: << 'lib'
require 'ZenTest'
$VERBOSE = nil
@@ -29,8 +33,8 @@ Rake::TestTask.new :test do |t|
end
desc 'Update Manifest.txt'
-task :update_manifest do
- sh "p4 open Manifest.txt; find . -type f | sed -e 's%./%%' | egrep -v 'swp|~' | egrep -v '^(doc|pkg)/' | sort > Manifest.txt"
+task :update_manifest => :clean do
+ sh "p4 open Manifest.txt; find . -type f | sed -e 's%./%%' | sort > Manifest.txt"
end
desc 'Generate RDoc'
@@ -47,6 +51,33 @@ Rake::GemPackageTask.new spec do |pkg|
pkg.need_tar = true
end
-desc 'Clean up'
-task :clean => [ :clobber_rdoc, :clobber_package ]
+$prefix = ENV['PREFIX'] || Config::CONFIG['prefix']
+$bin = File.join($prefix, 'bin')
+$lib = Config::CONFIG['sitelibdir']
+$bins = %w(ZenTest autotest unit_diff)
+$libs = %w(ZenTest.rb autotest.rb rails_autotest.rb unit_diff.rb)
+
+task :install do
+ $bins.each do |f|
+ install File.join("bin", f), $bin, :mode => 0555
+ end
+
+ $libs.each do |f|
+ install File.join("lib", f), $lib, :mode => 0444
+ end
+end
+task :uninstall do
+ $bins.each do |f|
+ rm_f File.join($bin, f)
+ end
+
+ $libs.each do |f|
+ rm_f File.join($lib, f)
+ end
+end
+
+desc 'Clean up'
+task :clean => [ :clobber_rdoc, :clobber_package ] do
+ rm_rf %w(*~ doc)
+end
View
8 lib/ZenTest.rb
@@ -4,6 +4,12 @@
$:.unshift( *$I.split(/:/) ) if defined? $I and String === $I
$r = false unless defined? $r # reverse mapping for testclass names
+if $r then
+ $-w = false # rails is retarded
+ $: << 'config'
+ require 'environment'
+end
+
$ZENTEST = true
$TESTING = true
@@ -19,7 +25,7 @@ def zentest
class ZenTest
- VERSION = '2.4.0'
+ VERSION = '3.0.0'
if $TESTING then
attr_reader :missing_methods
View
9 test/test_autotest.rb
@@ -18,7 +18,7 @@ def system(cmd)
attr_accessor :backtick_responses
- def `(cmd)
+ def `(cmd) # ` appeases emacs
@backtick_responses ||= []
raise 'Out of backtick responses' if @backtick_responses.empty?
return @backtick_responses.shift
@@ -172,11 +172,8 @@ def util_capture
$stderr = old_stderr
end
- def util_touch(file, time = nil)
- timestamp = time ? " -t #{time.strftime '%Y%m%d%H%M.%S'}" : nil
- cmd = "touch #{timestamp} #{file}"
- system cmd
+ def util_touch(file, t = Time.now)
+ File.utime(t, t, file)
end
-
end
Please sign in to comment.
Something went wrong with that request. Please try again.