forked from tdiary/tdiary-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
41 lines (36 loc) · 826 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
31
32
33
34
35
36
37
38
39
40
41
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rspec/core/rake_task'
require 'bundler/gem_tasks'
CLOBBER.include(
"coverage"
)
task :default => [:spec]
desc 'Run the code in specs'
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = "spec/**/*_spec.rb"
end
namespace :spec do
if defined?(RCov)
desc 'Run the code in specs with RCov'
RSpec::Core::RakeTask.new(:report) do |t|
t.pattern = "spec/**/*_spec.rb"
t.rcov = true
t.rcov_opts = IO.readlines(File.join('spec', 'rcov.opts')).map {|line| line.chomp.split(" ") }.flatten
end
else
desc 'Run the code in specs with SimpleCov'
task :report do
ENV['COVERAGE'] = 'simplecov'
Rake::Task["spec"].invoke
end
end
end
# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3