Skip to content

Commit

Permalink
expand filenames so there are no unfound files
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Sep 30, 2011
1 parent 593ae2b commit a0fb3f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/parallel_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.tests_in_groups(root, num_groups, options={})
end

def self.run_tests(test_files, process_number, options)
require_list = test_files.map { |filename| "\"./#{filename}\"" }.join(",")
require_list = test_files.map { |filename| %{"#{File.expand_path filename}"} }.join(",")
test_options = "- #{options[:test_options]}" unless RUBY_VERSION > '1.9.2' # test options passing is broken on 1.9.3 see issue #64
cmd = "ruby -Itest -e '[#{require_list}].each {|f| require f }' -- #{options[:test_options]}"
execute_command(cmd, process_number, options)
Expand Down
2 changes: 1 addition & 1 deletion spec/parallel_tests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
end

it "uses options" do
ParallelTests.should_receive(:open).with{|x,y| x=~ %r{ruby -Itest .* - -v}}.and_return mocked_process
ParallelTests.should_receive(:open).with{|x,y| x=~ %r{ruby -Itest .* -- -v}}.and_return mocked_process
ParallelTests.run_tests(['xxx'],1,:test_options => '-v')
end

Expand Down

0 comments on commit a0fb3f8

Please sign in to comment.