forked from errbit/errbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
25 lines (20 loc) · 658 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'rake'
require 'bundler'
Errbit::Application.load_tasks
Rake::Task[:default].clear if Rake::Task.task_defined?(:default)
namespace :spec do
desc "Preparing test env"
task :prepare do
tmp_env = Rails.env
Rails.env = "test"
%w( errbit:bootstrap ).each do |task|
Rake::Task[task].invoke
end
Rails.env = tmp_env
end
end
Rake::Task["spec"].prerequisites.push("spec:prepare")
task :default => ['spec']