zentest-without-autotest 4.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +21 -0
- data/.gitignore +1 -0
- data/History.txt +631 -0
- data/README.markdown +96 -0
- data/Rakefile +70 -0
- data/VERSION +1 -0
- data/bin/multigem +4 -0
- data/bin/multiruby +50 -0
- data/bin/multiruby_setup +73 -0
- data/bin/zentest +28 -0
- data/example_dot_autotest.rb +12 -0
- data/lib/focus.rb +21 -0
- data/lib/functional_test_matrix.rb +92 -0
- data/lib/multiruby.rb +426 -0
- data/lib/zentest.rb +576 -0
- data/lib/zentest_mapping.rb +117 -0
- data/test/helper.rb +6 -0
- data/test/test_focus.rb +34 -0
- data/test/test_zentest.rb +560 -0
- data/test/test_zentest_mapping.rb +238 -0
- data/zentest-without-autotest.gemspec +62 -0
- metadata +81 -0
@@ -0,0 +1,238 @@
|
|
1
|
+
require 'test/helper'
|
2
|
+
require 'zentest_mapping' unless defined? $ZENTEST
|
3
|
+
|
4
|
+
class Dummy
|
5
|
+
attr_accessor :inherited_methods
|
6
|
+
include ZenTestMapping
|
7
|
+
end
|
8
|
+
|
9
|
+
class TestZentestMapping < Test::Unit::TestCase
|
10
|
+
def setup
|
11
|
+
@tester = Dummy.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def util_simple_setup
|
15
|
+
klasses = {
|
16
|
+
"Something" => {
|
17
|
+
"method1" => true,
|
18
|
+
"method1!" => true,
|
19
|
+
"method1=" => true,
|
20
|
+
"method1?" => true,
|
21
|
+
"attrib" => true,
|
22
|
+
"attrib=" => true,
|
23
|
+
"equal?" => true,
|
24
|
+
"self.method3" => true,
|
25
|
+
"self.[]" => true,
|
26
|
+
},
|
27
|
+
}
|
28
|
+
test_klasses = {
|
29
|
+
"TestSomething" => {
|
30
|
+
"test_class_method4" => true,
|
31
|
+
"test_method2" => true,
|
32
|
+
"setup" => true,
|
33
|
+
"teardown" => true,
|
34
|
+
"test_class_index" => true,
|
35
|
+
},
|
36
|
+
}
|
37
|
+
@tester.inherited_methods = test_klasses.merge(klasses)
|
38
|
+
@generated_code = "
|
39
|
+
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
|
40
|
+
|
41
|
+
class Something
|
42
|
+
def self.method4(*args)
|
43
|
+
raise NotImplementedError, 'Need to write self.method4'
|
44
|
+
end
|
45
|
+
|
46
|
+
def method2(*args)
|
47
|
+
raise NotImplementedError, 'Need to write method2'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class TestSomething < Test::Unit::TestCase
|
52
|
+
def test_class_method3
|
53
|
+
raise NotImplementedError, 'Need to write test_class_method3'
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_attrib
|
57
|
+
raise NotImplementedError, 'Need to write test_attrib'
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_attrib_equals
|
61
|
+
raise NotImplementedError, 'Need to write test_attrib_equals'
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_equal_eh
|
65
|
+
raise NotImplementedError, 'Need to write test_equal_eh'
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_method1
|
69
|
+
raise NotImplementedError, 'Need to write test_method1'
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_method1_bang
|
73
|
+
raise NotImplementedError, 'Need to write test_method1_bang'
|
74
|
+
end
|
75
|
+
|
76
|
+
def test_method1_eh
|
77
|
+
raise NotImplementedError, 'Need to write test_method1_eh'
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_method1_equals
|
81
|
+
raise NotImplementedError, 'Need to write test_method1_equals'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Number of errors detected: 10
|
86
|
+
"
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_normal_to_test
|
90
|
+
self.util_simple_setup
|
91
|
+
assert_equal("test_method1", @tester.normal_to_test("method1"))
|
92
|
+
assert_equal("test_method1_bang", @tester.normal_to_test("method1!"))
|
93
|
+
assert_equal("test_method1_eh", @tester.normal_to_test("method1?"))
|
94
|
+
assert_equal("test_method1_equals", @tester.normal_to_test("method1="))
|
95
|
+
end
|
96
|
+
|
97
|
+
def test_normal_to_test_cls
|
98
|
+
self.util_simple_setup
|
99
|
+
assert_equal("test_class_method1",
|
100
|
+
@tester.normal_to_test("self.method1"))
|
101
|
+
assert_equal("test_class_method1_bang",
|
102
|
+
@tester.normal_to_test("self.method1!"))
|
103
|
+
assert_equal("test_class_method1_eh",
|
104
|
+
@tester.normal_to_test("self.method1?"))
|
105
|
+
assert_equal("test_class_method1_equals",
|
106
|
+
@tester.normal_to_test("self.method1="))
|
107
|
+
end
|
108
|
+
|
109
|
+
def test_normal_to_test_operators
|
110
|
+
self.util_simple_setup
|
111
|
+
assert_equal("test_and", @tester.normal_to_test("&"))
|
112
|
+
assert_equal("test_bang", @tester.normal_to_test("!"))
|
113
|
+
assert_equal("test_carat", @tester.normal_to_test("^"))
|
114
|
+
assert_equal("test_div", @tester.normal_to_test("/"))
|
115
|
+
assert_equal("test_equalstilde", @tester.normal_to_test("=~"))
|
116
|
+
assert_equal("test_minus", @tester.normal_to_test("-"))
|
117
|
+
assert_equal("test_or", @tester.normal_to_test("|"))
|
118
|
+
assert_equal("test_percent", @tester.normal_to_test("%"))
|
119
|
+
assert_equal("test_plus", @tester.normal_to_test("+"))
|
120
|
+
assert_equal("test_tilde", @tester.normal_to_test("~"))
|
121
|
+
end
|
122
|
+
|
123
|
+
def test_normal_to_test_overlap
|
124
|
+
self.util_simple_setup
|
125
|
+
assert_equal("test_equals2", @tester.normal_to_test("=="))
|
126
|
+
assert_equal("test_equals3", @tester.normal_to_test("==="))
|
127
|
+
assert_equal("test_ge", @tester.normal_to_test(">="))
|
128
|
+
assert_equal("test_gt", @tester.normal_to_test(">"))
|
129
|
+
assert_equal("test_gt2", @tester.normal_to_test(">>"))
|
130
|
+
assert_equal("test_index", @tester.normal_to_test("[]"))
|
131
|
+
assert_equal("test_index_equals", @tester.normal_to_test("[]="))
|
132
|
+
assert_equal("test_lt", @tester.normal_to_test("<"))
|
133
|
+
assert_equal("test_lt2", @tester.normal_to_test("<\<"))
|
134
|
+
assert_equal("test_lte", @tester.normal_to_test("<="))
|
135
|
+
assert_equal("test_method", @tester.normal_to_test("method"))
|
136
|
+
assert_equal("test_method_equals", @tester.normal_to_test("method="))
|
137
|
+
assert_equal("test_spaceship", @tester.normal_to_test("<=>"))
|
138
|
+
assert_equal("test_times", @tester.normal_to_test("*"))
|
139
|
+
assert_equal("test_times2", @tester.normal_to_test("**"))
|
140
|
+
assert_equal("test_unary_minus", @tester.normal_to_test("-@"))
|
141
|
+
assert_equal("test_unary_plus", @tester.normal_to_test("+@"))
|
142
|
+
assert_equal("test_class_index", @tester.normal_to_test("self.[]"))
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_test_to_normal
|
146
|
+
self.util_simple_setup
|
147
|
+
assert_equal("method1!",
|
148
|
+
@tester.test_to_normal("test_method1_bang", "Something"))
|
149
|
+
assert_equal("method1",
|
150
|
+
@tester.test_to_normal("test_method1", "Something"))
|
151
|
+
assert_equal("method1=",
|
152
|
+
@tester.test_to_normal("test_method1_equals", "Something"))
|
153
|
+
assert_equal("method1?",
|
154
|
+
@tester.test_to_normal("test_method1_eh", "Something"))
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_test_to_normal_cls
|
158
|
+
self.util_simple_setup
|
159
|
+
assert_equal("self.method1",
|
160
|
+
@tester.test_to_normal("test_class_method1"))
|
161
|
+
assert_equal("self.method1!",
|
162
|
+
@tester.test_to_normal("test_class_method1_bang"))
|
163
|
+
assert_equal("self.method1?",
|
164
|
+
@tester.test_to_normal("test_class_method1_eh"))
|
165
|
+
assert_equal("self.method1=",
|
166
|
+
@tester.test_to_normal("test_class_method1_equals"))
|
167
|
+
assert_equal("self.[]",
|
168
|
+
@tester.test_to_normal("test_class_index"))
|
169
|
+
end
|
170
|
+
|
171
|
+
def test_test_to_normal_extended
|
172
|
+
self.util_simple_setup
|
173
|
+
assert_equal("equal?",
|
174
|
+
@tester.test_to_normal("test_equal_eh_extension",
|
175
|
+
"Something"))
|
176
|
+
assert_equal("equal?",
|
177
|
+
@tester.test_to_normal("test_equal_eh_extension_again",
|
178
|
+
"Something"))
|
179
|
+
assert_equal("method1",
|
180
|
+
@tester.test_to_normal("test_method1_extension",
|
181
|
+
"Something"))
|
182
|
+
assert_equal("method1",
|
183
|
+
@tester.test_to_normal("test_method1_extension_again",
|
184
|
+
"Something"))
|
185
|
+
end
|
186
|
+
|
187
|
+
def test_test_to_normal_mapped
|
188
|
+
self.util_simple_setup
|
189
|
+
assert_equal("*", @tester.test_to_normal("test_times"))
|
190
|
+
assert_equal("*", @tester.test_to_normal("test_times_ext"))
|
191
|
+
assert_equal("==", @tester.test_to_normal("test_equals2"))
|
192
|
+
assert_equal("==", @tester.test_to_normal("test_equals2_ext"))
|
193
|
+
assert_equal("===", @tester.test_to_normal("test_equals3"))
|
194
|
+
assert_equal("===", @tester.test_to_normal("test_equals3_ext"))
|
195
|
+
assert_equal("[]", @tester.test_to_normal("test_index"))
|
196
|
+
assert_equal("[]", @tester.test_to_normal("test_index_ext"))
|
197
|
+
assert_equal("[]=", @tester.test_to_normal("test_index_equals"))
|
198
|
+
assert_equal("[]=", @tester.test_to_normal("test_index_equals_ext"))
|
199
|
+
end
|
200
|
+
|
201
|
+
def test_test_to_normal_operators
|
202
|
+
self.util_simple_setup
|
203
|
+
assert_equal("&", @tester.test_to_normal("test_and"))
|
204
|
+
assert_equal("!", @tester.test_to_normal("test_bang"))
|
205
|
+
assert_equal("^", @tester.test_to_normal("test_carat"))
|
206
|
+
assert_equal("/", @tester.test_to_normal("test_div"))
|
207
|
+
assert_equal("=~", @tester.test_to_normal("test_equalstilde"))
|
208
|
+
assert_equal("-", @tester.test_to_normal("test_minus"))
|
209
|
+
assert_equal("|", @tester.test_to_normal("test_or"))
|
210
|
+
assert_equal("%", @tester.test_to_normal("test_percent"))
|
211
|
+
assert_equal("+", @tester.test_to_normal("test_plus"))
|
212
|
+
assert_equal("~", @tester.test_to_normal("test_tilde"))
|
213
|
+
end
|
214
|
+
|
215
|
+
def test_test_to_normal_overlap
|
216
|
+
self.util_simple_setup
|
217
|
+
assert_equal("==", @tester.test_to_normal("test_equals2"))
|
218
|
+
assert_equal("===", @tester.test_to_normal("test_equals3"))
|
219
|
+
assert_equal(">=", @tester.test_to_normal("test_ge"))
|
220
|
+
assert_equal(">", @tester.test_to_normal("test_gt"))
|
221
|
+
assert_equal(">>", @tester.test_to_normal("test_gt2"))
|
222
|
+
assert_equal("[]", @tester.test_to_normal("test_index"))
|
223
|
+
assert_equal("[]=", @tester.test_to_normal("test_index_equals"))
|
224
|
+
assert_equal("<", @tester.test_to_normal("test_lt"))
|
225
|
+
assert_equal("<\<", @tester.test_to_normal("test_lt2"))
|
226
|
+
assert_equal("<=", @tester.test_to_normal("test_lte"))
|
227
|
+
assert_equal("<=>", @tester.test_to_normal("test_spaceship"))
|
228
|
+
assert_equal("*", @tester.test_to_normal("test_times"))
|
229
|
+
assert_equal("**", @tester.test_to_normal("test_times2"))
|
230
|
+
assert_equal("-@", @tester.test_to_normal("test_unary_minus"))
|
231
|
+
assert_equal("+@", @tester.test_to_normal("test_unary_plus"))
|
232
|
+
end
|
233
|
+
|
234
|
+
def test_to_normal_subset
|
235
|
+
self.util_simple_setup
|
236
|
+
assert_equal("get_foo", @tester.test_to_normal("test_get_foo"))
|
237
|
+
end
|
238
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{zentest-without-autotest}
|
8
|
+
s.version = "4.1.4"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Ryan Davis"]
|
12
|
+
s.date = %q{2010-01-10}
|
13
|
+
s.executables = ["multiruby", "multigem", "multiruby_setup", "zentest"]
|
14
|
+
s.extra_rdoc_files = [
|
15
|
+
"README.markdown"
|
16
|
+
]
|
17
|
+
s.files = [
|
18
|
+
".autotest",
|
19
|
+
".gitignore",
|
20
|
+
"History.txt",
|
21
|
+
"README.markdown",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"bin/multigem",
|
25
|
+
"bin/multiruby",
|
26
|
+
"bin/multiruby_setup",
|
27
|
+
"bin/zentest",
|
28
|
+
"example_dot_autotest.rb",
|
29
|
+
"lib/focus.rb",
|
30
|
+
"lib/functional_test_matrix.rb",
|
31
|
+
"lib/multiruby.rb",
|
32
|
+
"lib/zentest.rb",
|
33
|
+
"lib/zentest_mapping.rb",
|
34
|
+
"test/helper.rb",
|
35
|
+
"test/test_focus.rb",
|
36
|
+
"test/test_zentest.rb",
|
37
|
+
"test/test_zentest_mapping.rb",
|
38
|
+
"zentest-without-autotest.gemspec"
|
39
|
+
]
|
40
|
+
s.homepage = %q{http://github.com/grosser/zentest}
|
41
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
42
|
+
s.require_paths = ["lib"]
|
43
|
+
s.rubygems_version = %q{1.3.5}
|
44
|
+
s.summary = %q{ZenTest, without AutoTest and UnitDiff}
|
45
|
+
s.test_files = [
|
46
|
+
"test/test_zentest.rb",
|
47
|
+
"test/helper.rb",
|
48
|
+
"test/test_focus.rb",
|
49
|
+
"test/test_zentest_mapping.rb"
|
50
|
+
]
|
51
|
+
|
52
|
+
if s.respond_to? :specification_version then
|
53
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
|
+
s.specification_version = 3
|
55
|
+
|
56
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
57
|
+
else
|
58
|
+
end
|
59
|
+
else
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: zentest-without-autotest
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 4.1.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Davis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-01-10 00:00:00 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email:
|
18
|
+
executables:
|
19
|
+
- multiruby
|
20
|
+
- multigem
|
21
|
+
- multiruby_setup
|
22
|
+
- zentest
|
23
|
+
extensions: []
|
24
|
+
|
25
|
+
extra_rdoc_files:
|
26
|
+
- README.markdown
|
27
|
+
files:
|
28
|
+
- .autotest
|
29
|
+
- .gitignore
|
30
|
+
- History.txt
|
31
|
+
- README.markdown
|
32
|
+
- Rakefile
|
33
|
+
- VERSION
|
34
|
+
- bin/multigem
|
35
|
+
- bin/multiruby
|
36
|
+
- bin/multiruby_setup
|
37
|
+
- bin/zentest
|
38
|
+
- example_dot_autotest.rb
|
39
|
+
- lib/focus.rb
|
40
|
+
- lib/functional_test_matrix.rb
|
41
|
+
- lib/multiruby.rb
|
42
|
+
- lib/zentest.rb
|
43
|
+
- lib/zentest_mapping.rb
|
44
|
+
- test/helper.rb
|
45
|
+
- test/test_focus.rb
|
46
|
+
- test/test_zentest.rb
|
47
|
+
- test/test_zentest_mapping.rb
|
48
|
+
- zentest-without-autotest.gemspec
|
49
|
+
has_rdoc: true
|
50
|
+
homepage: http://github.com/grosser/zentest
|
51
|
+
licenses: []
|
52
|
+
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options:
|
55
|
+
- --charset=UTF-8
|
56
|
+
require_paths:
|
57
|
+
- lib
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: "0"
|
63
|
+
version:
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: "0"
|
69
|
+
version:
|
70
|
+
requirements: []
|
71
|
+
|
72
|
+
rubyforge_project:
|
73
|
+
rubygems_version: 1.3.5
|
74
|
+
signing_key:
|
75
|
+
specification_version: 3
|
76
|
+
summary: ZenTest, without AutoTest and UnitDiff
|
77
|
+
test_files:
|
78
|
+
- test/test_zentest.rb
|
79
|
+
- test/helper.rb
|
80
|
+
- test/test_focus.rb
|
81
|
+
- test/test_zentest_mapping.rb
|