Commit 8f1edf6f18b427842c580f25fe3829efb0640f04
1 parent
35ce2d0d
Exists in
master
and in
1 other branch
Dont run errbit:bootstrap in every test run
Showing
2 changed files
with
8 additions
and
23 deletions
Show diff stats
.travis.yml
| ... | ... | @@ -14,14 +14,9 @@ cache: bundler |
| 14 | 14 | |
| 15 | 15 | services: mongodb |
| 16 | 16 | |
| 17 | -#script: ./script/rspec-queue-mongoid.rb --format progress spec | |
| 17 | +script: bundle exec rake errbit:bootstrap spec | |
| 18 | 18 | |
| 19 | 19 | matrix: |
| 20 | 20 | allow_failures: |
| 21 | 21 | - rvm: rbx-2 |
| 22 | 22 | - rvm: ruby-head |
| 23 | - | |
| 24 | - | |
| 25 | -# To stop Travis from running tests for a new commit, | |
| 26 | -# add the following to your commit message: [ci skip] | |
| 27 | -# You should add this when you edit documentation or comments, etc. | ... | ... |
Rakefile
| 1 | +#!/usr/bin/env rake | |
| 1 | 2 | # Add your own tasks in files placed in lib/tasks ending in .rake, |
| 2 | 3 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. |
| 3 | 4 | |
| 4 | 5 | require File.expand_path('../config/application', __FILE__) |
| 5 | -require 'rake' | |
| 6 | -require 'bundler' | |
| 7 | 6 | |
| 8 | 7 | Errbit::Application.load_tasks |
| 9 | 8 | |
| 10 | -Rake::Task[:default].clear if Rake::Task.task_defined?(:default) | |
| 11 | - | |
| 12 | -namespace :spec do | |
| 13 | - desc "Preparing test env" | |
| 14 | - task :prepare do | |
| 15 | - tmp_env = Rails.env | |
| 16 | - Rails.env = "test" | |
| 17 | - %w( errbit:bootstrap ).each do |task| | |
| 18 | - Rake::Task[task].invoke | |
| 19 | - end | |
| 20 | - Rails.env = tmp_env | |
| 21 | - end | |
| 9 | +begin | |
| 10 | + require 'rspec/core/rake_task' | |
| 11 | + RSpec::Core::RakeTask.new(:spec) | |
| 12 | + task :default => :spec | |
| 13 | +rescue LoadError | |
| 14 | + # no rspec available | |
| 22 | 15 | end |
| 23 | - | |
| 24 | -Rake::Task["spec"].prerequisites.push("spec:prepare") | |
| 25 | -task :default => ['spec'] | |
| 26 | 16 | \ No newline at end of file | ... | ... |