Class: ParallelTests::RSpec::Runner
Class Method Summary
collapse
execute_command, find_results, line_is_result?, summarize_results, test_env_number, tests_in_groups
Class Method Details
.executable ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/parallel_tests/rspec/runner.rb', line 13
def self.executable
cmd = if File.file?("script/spec")
"script/spec"
elsif ParallelTests.bundler_enabled?
cmd = (run("bundle show rspec") =~ %r{/rspec-1[^/]+$} ? "spec" : "rspec")
"bundle exec #{cmd}"
else
%w[spec rspec].detect{|cmd| system "#{cmd} --version > /dev/null 2>&1" }
end
cmd or raise("Can't find executables rspec or spec")
end
|
.run_tests(test_files, process_number, options) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/parallel_tests/rspec/runner.rb', line 6
def self.run_tests(test_files, process_number, options)
exe = executable version = (exe =~ /\brspec\b/ ? 2 : 1)
cmd = "#{rspec_1_color if version == 1}#{exe} #{options[:test_options]} #{rspec_2_color if version == 2}#{spec_opts} #{test_files*' '}"
execute_command(cmd, process_number, options)
end
|
.runtime_log ⇒ Object
25
26
27
|
# File 'lib/parallel_tests/rspec/runner.rb', line 25
def self.runtime_log
'tmp/parallel_runtime_rspec.log'
end
|
.test_file_name ⇒ Object
29
30
31
|
# File 'lib/parallel_tests/rspec/runner.rb', line 29
def self.test_file_name
"spec"
end
|
.test_suffix ⇒ Object
33
34
35
|
# File 'lib/parallel_tests/rspec/runner.rb', line 33
def self.test_suffix
"_spec.rb"
end
|