Method: Roby::Application#each_test_file_for_loaded_models

Defined in:
lib/roby/app.rb

#each_test_file_for_loaded_models {|path, models| ... } ⇒ Object

Enumerate the test files that should be run to test the current app configuration

Yield Parameters:

  • path (String)

    the file’s path

  • models (Array<Class<Roby::Task>>)

    the models that are meant to be tested by ‘path’. It can be empty for tests that involve lib/



3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
# File 'lib/roby/app.rb', line 3392

def each_test_file_for_loaded_models(&block)
    models_per_file = Hash.new { |h, k| h[k] = Set.new }
    each_model do |m|
        next if m.respond_to?(:has_ancestor?) && m.has_ancestor?(Roby::Event)
        next if m.respond_to?(:private_specialization?) && m.private_specialization?
        next unless m.name

        test_files_for(m).each do |test_path|
            models_per_file[test_path] << m
        end
    end

    models_per_file.each(&block)
end