Sha256: 3a5b35219d518af363a75ca9815e9fef90cd00694b1e6d365e21532a2c0f7b39
Contents?: true
Size: 815 Bytes
Versions: 4
Compression:
Stored size: 815 Bytes
Contents
require File.join(File.dirname(__FILE__), 'parallel_tests') class ParallelSpecs < ParallelTests def self.run_tests(test_files, process_number, options) spec_opts = ['spec/parallel_spec.opts', 'spec/spec.opts'].detect{|f| File.file?(f) } spec_opts = (spec_opts ? "-O #{spec_opts}" : nil) color = ($stdout.tty? ? 'export RSPEC_COLOR=1 ;' : '')#display color when we are in a terminal cmd = "export RAILS_ENV=test ; #{color} #{executable} #{options} #{spec_opts} #{test_files*' '}" execute_command(cmd, process_number) end def self.executable if File.file?(".bundle/environment.rb") "bundle exec spec" elsif File.file?("script/spec") "script/spec" else "spec" end end protected def self.find_tests(root) Dir["#{root}**/**/*_spec.rb"] end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
parallel_tests-0.3.3 | lib/parallel_specs.rb |
parallel_tests-0.3.2 | lib/parallel_specs.rb |
parallel_tests-0.3.1 | lib/parallel_specs.rb |
parallel_tests-0.3.0 | lib/parallel_specs.rb |