forked from fatfreecrm/fat_free_crm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
29 lines (23 loc) · 796 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
26
27
28
# 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'
FatFreeCRM::Application.load_tasks
Rake::Task[:default].clear
namespace :spec do
desc "Preparing test env"
task :prepare do
tmp_env = Rails.env
Rails.env = "test"
Rake::Task["crm:copy_default_config"].invoke
puts "Running initial migrations..."
puts "Preparing test database..."
Rake::Task["db:schema:load"].invoke
Rake::Task["crm:settings:load"].invoke
Rails.env = tmp_env
end
end
Rake::Task["spec"].prerequisites.clear
Rake::Task["spec"].prerequisites.push("spec:prepare")
task :default => ['spec']