forked from cloudfoundry-attic/caldecott-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
31 lines (26 loc) · 770 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
require "rake"
require "rspec"
require "rspec/core/rake_task"
desc "Run specs"
task "spec" => ["bundler:install", "test:spec"]
desc "Run specs using RCov"
task "spec:rcov" => ["bundler:install", "test:spec:rcov"]
namespace "bundler" do
desc "Install gems"
task "install" do
sh("bundle install")
end
end
namespace "test" do
desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = ["--format", "documentation", "--colour"]
end
desc "Run all specs with rcov"
coverage_dir = File.expand_path(File.join(File.dirname(__FILE__), "coverage"))
RSpec::Core::RakeTask.new("spec:rcov") do |t|
t.rspec_opts = []
t.rcov = true
t.rcov_opts = %W{--exclude osx\/objc,gems\/,spec\/,features\/ -o "#{coverage_dir}"}
end
end