ZenTest 4.6.1 → 4.6.2
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.tar.gz.sig +0 -0
- data/.autotest +1 -1
- data/History.txt +10 -0
- data/README.txt +43 -12
- data/lib/autotest/restart.rb +3 -1
- data/lib/zentest.rb +1 -1
- data/test/test_zentest.rb +3 -1
- metadata +11 -11
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/.autotest
CHANGED
@@ -8,7 +8,7 @@ Autotest.add_hook :initialize do |at|
|
|
8
8
|
at.add_exception 'coverage.info'
|
9
9
|
|
10
10
|
at.libs << ':../../minitest/dev/lib'
|
11
|
-
at.testlib = "minitest
|
11
|
+
at.testlib = ".minitest"
|
12
12
|
|
13
13
|
%w(TestZenTest).each do |klass|
|
14
14
|
at.extra_class_map[klass] = "test/test_zentest.rb"
|
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -26,6 +26,16 @@ multiruby runs anything you want on multiple versions of ruby. Great
|
|
26
26
|
for compatibility checking! Use multiruby_setup to manage your
|
27
27
|
installed versions.
|
28
28
|
|
29
|
+
== FEATURES
|
30
|
+
|
31
|
+
* Scans your ruby code and tests and generates missing methods for you.
|
32
|
+
* Includes a very helpful filter for Test/Spec output called unit_diff.
|
33
|
+
* Continually and intelligently test only those files you change with autotest.
|
34
|
+
* Test against multiple versions with multiruby.
|
35
|
+
* Includes a LinuxJournal article on testing with ZenTest written by Pat Eyler.
|
36
|
+
* See also: http://blog.zenspider.com/archives/zentest/
|
37
|
+
* See also: http://blog.segment7.net/articles/category/zentest
|
38
|
+
|
29
39
|
== STRATEGERY
|
30
40
|
|
31
41
|
There are two strategeries intended for ZenTest: test conformance
|
@@ -40,16 +50,39 @@ ZenTest can also be used to evaluate generated code and execute your
|
|
40
50
|
tests, allowing for very rapid development of both tests and
|
41
51
|
implementation.
|
42
52
|
|
43
|
-
==
|
53
|
+
== AUTOTEST TIPS
|
44
54
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
55
|
+
Setting up your project with a custom setup is easily done by creating
|
56
|
+
a ".autotest" file in your project. Here is an example of adding some
|
57
|
+
plugins, using minitest as your test library, and running rcov on full
|
58
|
+
passes:
|
59
|
+
|
60
|
+
require 'autotest/restart'
|
61
|
+
|
62
|
+
Autotest.add_hook :initialize do |at|
|
63
|
+
at.testlib = "minitest/autorun"
|
64
|
+
end
|
65
|
+
|
66
|
+
Autotest.add_hook :all_good do |at|
|
67
|
+
system "rake rcov_info"
|
68
|
+
end if ENV['RCOV']
|
69
|
+
|
70
|
+
Do note, since minitest ships with ruby19, if you want to use the
|
71
|
+
latest minitest gem you need to ensure that the gem activation occurs!
|
72
|
+
To do this, add the gem activation and the proper require to a
|
73
|
+
separate file (like ".minitest.rb" or even a test helper if you have
|
74
|
+
one) and use that for your testlib instead:
|
75
|
+
|
76
|
+
.minitest.rb:
|
77
|
+
|
78
|
+
gem "minitest"
|
79
|
+
require "minitest/autorun"
|
80
|
+
|
81
|
+
.autotest:
|
82
|
+
|
83
|
+
Autotest.add_hook :initialize do |at|
|
84
|
+
at.testlib = ".minitest"
|
85
|
+
end
|
53
86
|
|
54
87
|
== SYNOPSYS
|
55
88
|
|
@@ -62,15 +95,13 @@ implementation.
|
|
62
95
|
multiruby_setup mri:svn:current
|
63
96
|
multiruby ./TestMyProject.rb
|
64
97
|
|
65
|
-
(and other stuff for Test::Rails)
|
66
|
-
|
67
98
|
== Windows and Color
|
68
99
|
|
69
100
|
Read this: http://blog.mmediasys.com/2010/11/24/we-all-love-colors/
|
70
101
|
|
71
102
|
== REQUIREMENTS
|
72
103
|
|
73
|
-
* Ruby 1.
|
104
|
+
* Ruby 1.8+, JRuby 1.1.2+, or rubinius
|
74
105
|
* A test/spec framework of your choice.
|
75
106
|
* Hoe (development)
|
76
107
|
* rubygems
|
data/lib/autotest/restart.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Autotest::Restart
|
2
2
|
Autotest.add_hook :initialize do |at|
|
3
|
-
configs = [File.expand_path('~/.autotest'), './.autotest']
|
3
|
+
configs = [File.expand_path('~/.autotest'), './.autotest'].select { |f|
|
4
|
+
File.exist? f
|
5
|
+
}
|
4
6
|
at.extra_files.concat configs
|
5
7
|
false
|
6
8
|
end
|
data/lib/zentest.rb
CHANGED
data/test/test_zentest.rb
CHANGED
@@ -557,7 +557,9 @@ assert_equal expected, util_testcase("Something2::Blah2", "TestSomething2::TestB
|
|
557
557
|
|
558
558
|
def test_testcase9
|
559
559
|
# stupid YAML is breaking my tests. Enters via Test::Rails. order dependent.
|
560
|
-
|
560
|
+
if defined? YAML then
|
561
|
+
TrueClass.send :remove_method, :taguri, :taguri=, :to_yaml rescue nil
|
562
|
+
end
|
561
563
|
|
562
564
|
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"
|
563
565
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ZenTest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 35
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 4
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 4.6.
|
9
|
+
- 2
|
10
|
+
version: 4.6.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
FBHgymkyj/AOSqKRIpXPhjC6
|
38
38
|
-----END CERTIFICATE-----
|
39
39
|
|
40
|
-
date: 2011-08-
|
40
|
+
date: 2011-08-24 00:00:00 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: minitest
|
@@ -47,11 +47,11 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - ~>
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
hash:
|
50
|
+
hash: 9
|
51
51
|
segments:
|
52
52
|
- 2
|
53
|
-
-
|
54
|
-
version: "2.
|
53
|
+
- 5
|
54
|
+
version: "2.5"
|
55
55
|
type: :development
|
56
56
|
version_requirements: *id001
|
57
57
|
- !ruby/object:Gem::Dependency
|
@@ -62,11 +62,11 @@ dependencies:
|
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
hash:
|
65
|
+
hash: 27
|
66
66
|
segments:
|
67
67
|
- 2
|
68
|
-
-
|
69
|
-
version: "2.
|
68
|
+
- 12
|
69
|
+
version: "2.12"
|
70
70
|
type: :development
|
71
71
|
version_requirements: *id002
|
72
72
|
description: |-
|
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
179
|
requirements: []
|
180
180
|
|
181
181
|
rubyforge_project: zentest
|
182
|
-
rubygems_version: 1.8.
|
182
|
+
rubygems_version: 1.8.9
|
183
183
|
signing_key:
|
184
184
|
specification_version: 3
|
185
185
|
summary: "ZenTest provides 4 different tools: zentest, unit_diff, autotest, and multiruby"
|
metadata.gz.sig
CHANGED
Binary file
|