-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
55 lines (48 loc) · 1.63 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#------------------------------------------------------------------#
# Gem Packaging Tasks
#------------------------------------------------------------------#
begin
require "bundler"
Bundler::GemHelper.install_tasks
rescue LoadError
# no bundler available
end
#------------------------------------------------------------------#
# Linter Tasks
#------------------------------------------------------------------#
begin
require "chefstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:lint) do |task|
task.options += ["--display-cop-names", "--no-color", "--parallel"]
end
rescue LoadError
puts "rubocop is not available. Install the rubocop gem to run the lint tests."
end
#------------------------------------------------------------------#
# Test Runner Tasks
#------------------------------------------------------------------#
require "rake/testtask"
namespace(:test) do
# This task template will make a task named 'test', and run
# the tests that it finds.
# Here, we split up the tests a bit, for the convenience
# of the developer.
desc "Run unit tests, to probe internal correctness"
Rake::TestTask.new(:unit) do |task|
task.libs << "test"
task.pattern = "test/unit/*_spec.rb"
task.warning = false
end
end
#------------------------------------------------------------------#
# Bump Tasks
#------------------------------------------------------------------#
begin
require "bump/tasks"
Bundler::GemHelper.install_tasks
rescue LoadError
# no bundler available
end
desc "Run all tests"
task test: %i{test:unit}