Permalink
Browse files

Add test:isolated task

  • Loading branch information...
1 parent 771b70a commit 5e77e7fcd0369b46dff6b09243c54362370d0648 Adrian Mugnolo committed Dec 30, 2013
Showing with 13 additions and 1 deletion.
  1. +13 −1 Rakefile
View
@@ -3,10 +3,22 @@ require "bundler/gem_tasks"
require "rake/testtask"
desc 'Run tests'
-Rake::TestTask.new(:test) do |t|
+test_task = Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
task default: :test
+
+desc 'Run tests in isolated processes'
+namespace :test do
+ task :isolated do
+ Dir[test_task.pattern].each do |file|
+ cmd = ['ruby']
+ test_task.libs.each { |l| cmd << '-I' << l }
+ cmd << file
+ sh cmd.join(' ')
+ end
+ end
+end

0 comments on commit 5e77e7f

Please sign in to comment.