@@ -145,7 +145,8 @@ def suite=(test_objects)
145145 # List of test files to run.
146146 #
147147 # @return [Array<String>]
148- def files
148+ def files ( *list )
149+ @files . concat ( makelist ( list ) ) unless list . empty?
149150 @files
150151 end
151152 alias test_files files
@@ -175,19 +176,27 @@ def autopath=(boolean)
175176 # Paths to add to $LOAD_PATH.
176177 #
177178 # @return [Array<String>]
178- attr :loadpath
179+ def loadpath ( *list )
180+ @loadpath . concat ( makelist ( list ) ) unless list . empty?
181+ @loadpath
182+ end
183+ alias :load_path :loadpath
179184
180185 # Set paths to add to $LOAD_PATH.
181186 #
182187 # @return [Array<String>]
183188 def loadpath = ( list )
184189 @loadpath = makelist ( list )
185190 end
191+ alias :load_path= :loadpath=
186192
187193 # Scripts to require prior to tests.
188194 #
189195 # @return [Array<String>]
190- attr :requires
196+ def requires ( *list )
197+ @requires . concat ( makelist ( list ) ) unless list . empty?
198+ @requires
199+ end
191200
192201 # Set the features that need to be required before the
193202 # test files.
@@ -200,15 +209,19 @@ def requires=(list)
200209 # Name of test report format, by default it is `dotprogress`.
201210 #
202211 # @return [String] format
203- def format
212+ def format ( name = nil )
213+ @format = name . to_s if name
204214 @format || DEFAULT_FORMAT
205215 end
206216
207217 # Set test report format.
208218 #
219+ # @param [String] name
220+ # Name of the report format.
221+ #
209222 # @return [String] format
210- def format = ( format )
211- @format = format . to_s
223+ def format = ( name )
224+ @format = name . to_s
212225 end
213226
214227 # Provide extra details in reports?
@@ -228,7 +241,8 @@ def verbose=(boolean)
228241 # Selection of tags for filtering tests.
229242 #
230243 # @return [Array<String>]
231- def tags
244+ def tags ( *list )
245+ @tags . concat ( makelist ( list ) ) unless list . empty?
232246 @tags
233247 end
234248
@@ -242,7 +256,8 @@ def tags=(list)
242256 # Description match for filtering tests.
243257 #
244258 # @return [Array<String>]
245- def match
259+ def match ( *list )
260+ @match . concat ( makelist ( list ) ) unless list . empty?
246261 @match
247262 end
248263
@@ -257,7 +272,8 @@ def match=(list)
257272 # which are matched against module, class and method names.
258273 #
259274 # @return [Array<String>]
260- def units
275+ def units ( *list )
276+ @units . concat ( makelist ( list ) ) unless list . empty?
261277 @units
262278 end
263279
@@ -286,7 +302,8 @@ def hard=(boolean)
286302 # Change to this directory before running tests.
287303 #
288304 # @return [String]
289- def chdir
305+ def chdir ( dir = nil )
306+ @chdir = dir . to_s if dir
290307 @chdir
291308 end
292309
0 commit comments