-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
40 lines (31 loc) · 872 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
# -*-ruby-*-
require 'rake'
# require 'rspec/core/rake_task'
desc 'Runs all development tests'
task :test
task :test => [:syntax]
desc 'Checks ruby files for syntax errors'
task :syntax do |t|
puts '------------Syntax-----------'
Dir.glob('**/*.rb').each do |f|
system("/bin/echo -n '#{f}: '; ruby -c #{f}")
end
end
task :test => [:rubocop]
desc 'Runs rubocop against the cookbook, to enforce style and standards.'
task :rubocop do |t|
puts '------------Rubocop-----------'
system('rubocop -c rubocop.yml')
end
task :test => [:foodcritic]
desc 'Runs foodcritic rules against the cookbook'
task :foodcritic do |t|
puts '------------Foodcritic-----------'
system('foodcritic .')
end
# task :test => [:unit]
# desc 'Runs unit tests'
# RSpec::Core::RakeTask.new(:unit) do |t|
# t.pattern = 'test/unit/**/*_spec.rb'
# t.rspec_opts = '-fd'
# end