method

extract_filters

Importance_0
v5.2.3 - 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| arg =~ %^/?\w+/% && !arg.end_with?("/") }.map do |path|
              case
              when path =~ /(:\d+)+$/
                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.