forked from arunjax/cookbooks-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
34 lines (29 loc) · 750 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
#!/usr/bin/env rake
require 'rake'
require 'rake/tasklib'
require 'rake/testtask'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new do |t|
t.rspec_opts = '--default_path test/unit'
end
require 'rubocop/rake_task'
desc 'Run RuboCop to check style'
Rubocop::RakeTask.new(:rubocop) do |task|
task.patterns = ['**/*.rb']
# only show the files with failures
#task.formatters = ['files']
# don't abort rake on failure
task.fail_on_error = false
task.options = ['-D']
end
begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue LoadError
warn 'Could not load kitchen rake tasks, skipping'
end
# aliases
task :test => :spec
task :lint => [:rubocop]
task :default => [:lint, :test]
task :all => [:test, 'kitchen:all']