infinity_test 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.markdown +4 -0
- data/VERSION.yml +1 -1
- data/infinity_test.gemspec +1 -1
- data/lib/infinity_test/application.rb +12 -7
- metadata +2 -2
data/History.markdown
CHANGED
data/VERSION.yml
CHANGED
data/infinity_test.gemspec
CHANGED
@@ -250,18 +250,23 @@ module InfinityTest
|
|
250
250
|
# files_to_run!(match_data) # => return the test file
|
251
251
|
#
|
252
252
|
def files_to_run!(options)
|
253
|
-
files =
|
254
|
-
|
253
|
+
files = search_files_to_run!(options)
|
254
|
+
# Fix fo Test::Unit - But this is not responsability of the Application instances - Refactoring this
|
255
|
+
files = "#{test_framework.test_loader} #{files}" if test_framework.respond_to?(:test_loader)
|
256
|
+
files
|
257
|
+
end
|
258
|
+
|
259
|
+
def search_files_to_run!(options)
|
260
|
+
case options
|
261
|
+
when MatchData
|
262
|
+
options.to_s
|
263
|
+
when Hash,Symbol
|
255
264
|
if options.equal?(:all) or options.include?(:all)
|
256
265
|
search_files_in_dir(all_test_files, :in_dir => options[:in_dir]).join(' ')
|
257
266
|
else
|
258
267
|
search_file(:pattern => options[:test_for][1], :in_dir => options[:in_dir]) if options.include?(:test_for)
|
259
268
|
end
|
260
|
-
end
|
261
|
-
files = files.call
|
262
|
-
# Fix fo Test::Unit - But this is not responsability of the Application instances - Refactoring this
|
263
|
-
files = "#{test_framework.test_loader} #{files}" if test_framework.respond_to?(:test_loader)
|
264
|
-
files
|
269
|
+
end
|
265
270
|
end
|
266
271
|
|
267
272
|
# Search files under the dir(s) specified
|