shanel-autotest 4.2.3

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/.autotest ADDED
@@ -0,0 +1,148 @@
1
+ # To try this out:
2
+ #
3
+ # gem install ZenTest
4
+ # gem install redgreen
5
+ #
6
+ # Note: this won't run the deeptest stuff or the full commandline stuff either
7
+
8
+ require 'redgreen/autotest'
9
+
10
+ Autotest.add_hook :initialize do |at|
11
+
12
+ at.clear_mappings
13
+
14
+ at.order = :reverse
15
+
16
+ %w{.git ./test/unit/unit_test_helper.rb ./lib/corpdb/cmdline.rb ./test/client/cdb/test_helper.rb}.each {|exception| at.add_exception(exception)}
17
+
18
+ at.add_exception %r%^\./(?:db|doc|log|public|tmp|vendor)%
19
+
20
+ at.add_mapping(%r%^lib/corpdb/api/(\w*)\.rb$%) do |_, m|
21
+ short = File.basename(m[1])
22
+ "test/api/clientlib/small/#{short}_test.rb"
23
+ end
24
+
25
+ at.add_mapping(%r%^lib/corpdb/api/rest/(\w*)\.rb$%) do |_, m|
26
+ short = File.basename(m[1])
27
+ "test/api/clientlib/small/#{short}_test.rb"
28
+ end
29
+
30
+ at.add_mapping(%r%^app/apis/(\w*)\.rb$%) do |_, m|
31
+ short = File.basename(m[1])
32
+ "test/functional/#{short}_test.rb"
33
+ end
34
+
35
+ at.add_mapping(%r%^lib/corpdb/commandline/commands/(\w*)\.rb$%) do |_, m|
36
+ short = File.basename(m[1])
37
+ "test/client/cdb/small/#{short}/.*_test.rb"
38
+ end
39
+
40
+ at.add_mapping(%r%^lib/corpdb/commandline/commands/(\w*)/(\w*)\.rb$%) do |_, m|
41
+ dir = File.basename(m[1])
42
+ short = File.basename(m[2])
43
+ "test/client/cdb/small/#{dir}/#{short}_test.rb"
44
+ end
45
+
46
+ at.add_mapping(%r%^lib/corpdb/(\w*)\.rb$%) do |_, m|
47
+ short = File.basename(m[1])
48
+ ["test/lib/small/#{short}_test.rb",
49
+ "test/unit/#{short}_test.rb"]
50
+ end
51
+
52
+ at.add_mapping(%r%^lib/corpdb/commandline/commands/(\w*)/(\w*)\.rb$%) do |_, m|
53
+ dir = File.basename(m[1])
54
+ short = File.basename(m[2])
55
+ "test/client/cdb/small/#{dir}/#{short}_test.rb"
56
+ end
57
+
58
+ at.add_mapping(%r%^script/(\w*)\.rb$%) do |_, m|
59
+ short = File.basename(m[1])
60
+ "test/script/small/#{short}_test.rb"
61
+ end
62
+
63
+ at.add_mapping(%r%^script/(\w*)/(\w*)\.rb$%) do |_, m|
64
+ dir = File.basename(m[1])
65
+ short = File.basename(m[2])
66
+ "test/script/small/#{dir}/#{short}_test.rb"
67
+ end
68
+
69
+ at.add_mapping %r%^test/fixtures/(.*)s.yml% do |_, m|
70
+ ["test/server/medium/models/#{m[1]}_test.rb",
71
+ "test/server/medium/controllers/#{m[1]}_controller_test.rb"]
72
+ end
73
+
74
+ at.add_mapping %r%^test/server/(small|medium)/(controllers|helpers|models)/.*_test\.rb$% do |filename, _|
75
+ filename
76
+ end
77
+
78
+ at.add_mapping %r%^test/client/cdb/(small|medium)/.*/.*_test\.rb$% do |filename, _|
79
+ filename
80
+ end
81
+
82
+ at.add_mapping %r%^test/script/(small|medium)/.*_test\.rb$% do |filename, _|
83
+ filename
84
+ end
85
+
86
+ at.add_mapping %r%^test/script/(small|medium)/.*/.*_test\.rb$% do |filename, _|
87
+ filename
88
+ end
89
+
90
+ at.add_mapping %r%^test/api/clientlib/small/.*_test\.rb$% do |filename, _|
91
+ filename
92
+ end
93
+
94
+ at.add_mapping %r%^test/clientapi_soap/.*_test\.rb$% do |filename, _|
95
+ filename
96
+ end
97
+
98
+ at.add_mapping %r%^test/functional/.*_test\.rb$% do |filename, _|
99
+ filename
100
+ end
101
+
102
+ at.add_mapping %r%^test/performance/.*_test\.rb$% do |filename, _|
103
+ filename
104
+ end
105
+
106
+ at.add_mapping %r%^app/models/(.*)\.rb$% do |_, m|
107
+ ["test/server/small/models/#{m[1]}_test.rb",
108
+ "test/server/medium/models/#{m[1]}_test.rb"]
109
+ end
110
+
111
+ at.add_mapping %r%^app/helpers/application_helper.rb% do
112
+ at.files_matching %r%^test/(views|functional)/.*_test\.rb$%
113
+ end
114
+
115
+ at.add_mapping %r%^app/helpers/(.*)_helper.rb% do |_, m|
116
+ if m[1] == "application" then
117
+ at.files_matching %r%^test/(views|functional)/.*_test\.rb$%
118
+ else
119
+ ["test/views/#{m[1]}_view_test.rb",
120
+ "test/functional/#{m[1]}_controller_test.rb",
121
+ "test/server/medium/helpers/#{m[1]}_helper_test.rb"]
122
+ end
123
+ end
124
+
125
+ at.add_mapping %r%^app/views/(.*)/% do |_, m|
126
+ ["test/views/#{m[1]}_view_test.rb",
127
+ "test/functional/#{m[1]}_controller_test.rb"]
128
+ end
129
+
130
+ at.add_mapping %r%^app/controllers/(.*)\.rb$% do |_, m|
131
+ if m[1] == "application" then
132
+ at.files_matching %r%^test/(controllers|views|functional)/.*_test\.rb$%
133
+ else
134
+ ["test/server/medium/controllers/#{m[1]}_test.rb",
135
+ "test/functional/#{m[1]}_test.rb"]
136
+ end
137
+ end
138
+
139
+ at.add_mapping %r%^app/views/layouts/% do
140
+ "test/views/layouts_view_test.rb"
141
+ end
142
+
143
+ at.add_mapping %r%^config/routes.rb$% do # FIX:
144
+ at.files_matching %r%^test/server/medium/controllers/.*_test\.rb$%
145
+ end
146
+
147
+
148
+ end
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg