method

extract_filters

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Runner
extract_filters(argv) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/test_unit/runner.rb, line 65
          def extract_filters(argv)
            # Extract absolute and relative paths but skip -n /.*/ regexp filters.
            argv.filter_map do |path|
              next unless path_argument?(path)

              path = path.tr("\\", "/")
              case
              when /(:\d+(-\d+)?)+$/.match?(path)
                file, *lines = path.split(":")
                filters << [ file, lines ]
                file
              when Dir.exist?(path)
                "#{path}/**/*_test.rb"
              else
                filters << [ path, [] ]
                path
              end
            end
          end
Register or log in to add new notes.