-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
46 lines (38 loc) · 1.07 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
require 'rspec/core/rake_task'
require 'foodcritic'
require 'rubocop/rake_task'
require 'kitchen/rake_tasks'
task :default => ['test:quick']
namespace :test do
RSpec::Core::RakeTask.new(:unit) do |t|
t.rspec_opts = %w(
--color
--format progress
).join(' ')
end
FoodCritic::Rake::LintTask.new do |t|
t.options = { :fail_tags => %w(correctness services libraries deprecated) }
end
RuboCop::RakeTask.new(:rubocop) do |task|
task.patterns = %w( recipes/*.rb libraries/*.rb providers/*.rb resources/*.rb
spec/**/*.rb test/**/*.rb )
task.formatters = ['progress']
task.fail_on_error = false
end
Kitchen::RakeTasks.new
desc 'Run just the quick tests'
task :quick do
Rake::Task['test:rubocop'].invoke
Rake::Task['test:foodcritic'].invoke
Rake::Task['test:unit'].invoke
end
desc "Run *all* the tests. Tea time."
task :complete do
Rake::Task['test:quick'].invoke
Rake::Task['test:kitchen:all'].invoke
end
desc "Run CI tests"
task :ci do
Rake::Task['test:complete'].invoke
end
end