Commit 353ca69c7d528a24046696de52b5d930ebce1d82
1 parent
302c7d82
Exists in
master
and in
1 other branch
add travis script to use test-queue in CI
Showing
4 changed files
with
20 additions
and
0 deletions
Show diff stats
.travis.yml
Gemfile
| ... | ... | @@ -86,6 +86,7 @@ group :development, :test do |
| 86 | 86 | end |
| 87 | 87 | # gem 'rpm_contrib' |
| 88 | 88 | # gem 'newrelic_rpm' |
| 89 | + gem 'test-queue', :require => false | |
| 89 | 90 | end |
| 90 | 91 | |
| 91 | 92 | group :development do |
| ... | ... | @@ -99,6 +100,7 @@ group :development do |
| 99 | 100 | |
| 100 | 101 | # Use thin for development |
| 101 | 102 | gem 'thin', :group => :development, :platform => :ruby |
| 103 | + | |
| 102 | 104 | end |
| 103 | 105 | |
| 104 | 106 | group :test do | ... | ... |
Gemfile.lock
| ... | ... | @@ -326,6 +326,7 @@ GEM |
| 326 | 326 | multi_json (~> 1.0) |
| 327 | 327 | rack (~> 1.0) |
| 328 | 328 | tilt (~> 1.1, != 1.3.0) |
| 329 | + test-queue (0.1.3) | |
| 329 | 330 | therubyracer (0.11.4) |
| 330 | 331 | libv8 (~> 3.11.8.12) |
| 331 | 332 | ref |
| ... | ... | @@ -413,6 +414,7 @@ DEPENDENCIES |
| 413 | 414 | ruby-debug |
| 414 | 415 | ruby-fogbugz |
| 415 | 416 | rushover |
| 417 | + test-queue | |
| 416 | 418 | therubyracer |
| 417 | 419 | thin |
| 418 | 420 | tilt! | ... | ... |
| ... | ... | @@ -0,0 +1,15 @@ |
| 1 | +#!/usr/bin/env ruby | |
| 2 | +require 'bundler' | |
| 3 | +Bundler.setup(:default, :development, :test) | |
| 4 | +require 'test_queue' | |
| 5 | +require 'test_queue/runner/rspec' | |
| 6 | + | |
| 7 | + | |
| 8 | +class MongoidRspecRunner < TestQueue::Runner::RSpec | |
| 9 | + def after_fork(num) | |
| 10 | + super | |
| 11 | + Mongoid.master = Mongoid.master.connection.db(Mongoid.master.name + "_#{num}") | |
| 12 | + end | |
| 13 | +end | |
| 14 | + | |
| 15 | +MongoidRspecRunner.new.execute | ... | ... |