Method: Roby::Application#discover_test_files
- Defined in:
- lib/roby/app.rb
#discover_test_files(all: true, only_self: false, base_dir: File.join(app_dir, "test")) ⇒ Array<String>
Discover which tests should be run, and require them
3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 |
# File 'lib/roby/app.rb', line 3308 def discover_test_files(all: true, only_self: false, base_dir: File.join(app_dir, "test")) if all test_files = each_test_file_in(base_dir).with_object({}) do |t, h| h[t] = [] end unless only_self test_files.merge!(Hash[each_test_file_for_loaded_models.to_a]) end else test_files = Hash[each_test_file_for_loaded_models.to_a] if only_self test_files = test_files.find_all { |f, _| self_file?(f) } end end test_files end |