module ParallelTests
rake tasks for Rails 3+
Constants
- VERSION
Public Class Methods
bundler_enabled?()
click to toggle source
copied from github.com/carlhuda/bundler Bundler::SharedHelpers#find_gemfile
# File lib/parallel_tests.rb, line 16 def self.bundler_enabled? return true if Object.const_defined?(:Bundler) previous = nil current = File.expand_path(Dir.pwd) until !File.directory?(current) || current == previous filename = File.join(current, "Gemfile") return true if File.exists?(filename) current, previous = File.expand_path("..", current), current end false end
determine_number_of_processes(count)
click to toggle source
# File lib/parallel_tests.rb, line 7 def self.determine_number_of_processes(count) [ count, ENV['PARALLEL_TEST_PROCESSORS'], Parallel.processor_count ].detect{|c| not c.to_s.strip.empty? }.to_i end