-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
31 lines (23 loc) · 805 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
29
30
# 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.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
begin
require 'delayed/tasks'
rescue LoadError
STDERR.puts "Run `rake gems:install` to install delayed_job"
end
task :clean do
puts 'Cleaning old coverage.data'
FileUtils.rm('coverage.data') if(File.exists? 'coverage.data')
end
Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
spec.rcov_opts = %w{--rails --exclude spec\/*,gems\/*,ruby\/* --aggregate coverage.data}
end
task :default => [:clean, :rcov]