diff --git a/lib/parallel_tests/cli.rb b/lib/parallel_tests/cli.rb index 7b94508f..003c41ed 100644 --- a/lib/parallel_tests/cli.rb +++ b/lib/parallel_tests/cli.rb @@ -278,7 +278,7 @@ def parse_options!(argv) opts.on("--nice", "execute test commands with low priority.") { options[:nice] = true } opts.on("--runtime-log [PATH]", "Location of previously recorded test runtimes") { |path| options[:runtime_log] = path } opts.on("--allowed-missing [INT]", Integer, "Allowed percentage of missing runtimes (default = 50)") { |percent| options[:allowed_missing_percent] = percent } - opts.on('--allow-duplicates', 'When detecting files to run, allow duplicates') { |arg| options[:allow_duplicates] = true } + opts.on('--allow-duplicates', 'When detecting files to run, allow duplicates') { options[:allow_duplicates] = true } opts.on("--unknown-runtime [FLOAT]", Float, "Use given number as unknown runtime (otherwise use average time)") { |time| options[:unknown_runtime] = time } opts.on("--first-is-1", "Use \"1\" as TEST_ENV_NUMBER to not reuse the default test environment") { options[:first_is_1] = true } opts.on("--fail-fast", "Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported") { options[:fail_fast] = true } diff --git a/lib/parallel_tests/test/runner.rb b/lib/parallel_tests/test/runner.rb index 0ce64d8c..25841d73 100644 --- a/lib/parallel_tests/test/runner.rb +++ b/lib/parallel_tests/test/runner.rb @@ -249,7 +249,9 @@ def find_tests(tests, options = {}) else file_or_folder end - end.then { |files| allow_duplicates ? files : files.uniq } + end + + allow_duplicates ? files : files.uniq end def files_in_folder(folder, options = {})