method

extract_filters

Importance_0
v6.1.3.1 - Show latest stable - 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 62
          def extract_filters(argv)
            # Extract absolute and relative paths but skip -n /.*/ regexp filters.
            argv.select { |arg| path_argument?(arg) && !regexp_filter?(arg) }.map do |path|
              path = path.tr("\\", "/")
              case
              when /(:\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.