Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow running test files with multiple spaces #832

Merged
merged 1 commit into from Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/parallel_tests/test/runner.rb
Expand Up @@ -24,7 +24,7 @@ def test_file_name
end

def run_tests(test_files, process_number, num_processes, options)
require_list = test_files.map { |file| file.sub(" ", "\\ ") }.join(" ")
require_list = test_files.map { |file| file.gsub(" ", "\\ ") }.join(" ")
cmd = "#{executable} -Itest -e '%w[#{require_list}].each { |f| require %{./\#{f}} }' -- #{options[:test_options]}"
execute_command(cmd, process_number, num_processes, options)
end
Expand Down
6 changes: 6 additions & 0 deletions spec/integration_spec.rb
Expand Up @@ -465,6 +465,12 @@ def test_unicode
)
end

it "can run with uncommon file names" do
skip if RUBY_PLATFORM == "java" # just too slow ...
write "test/long ( stuff ) _test.rb", "puts 'hey'"
expect(run_tests("test", processes: 2)).to include("hey")
end

context "RSpec" do
it_runs_the_default_folder_if_it_exists "rspec", "spec"

Expand Down