diff options
author | Tim Smith <tsmith84@gmail.com> | 2019-12-20 21:53:04 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2019-12-20 21:53:04 -0800 |
commit | 322fd21cee0815102af8bdc2be8b016d6ea346f0 (patch) | |
tree | 0c73278eaa52e3c7f44dbe52d82a7bba1140ca80 /Rakefile | |
parent | cacf2ec72ca4f07f60a6ea97abd287a754d635ac (diff) | |
download | wmi-lite-322fd21cee0815102af8bdc2be8b016d6ea346f0.tar.gz |
Migrate testing to Buildkite
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -1,4 +1,28 @@ -require 'bundler/gem_tasks' +require "bundler/gem_tasks" + +begin + require "rspec/core/rake_task" + + RSpec::Core::RakeTask.new do |t| + t.pattern = "spec/**/*_spec.rb" + end +rescue LoadError + desc "rspec is not installed, this task is disabled" + task :spec do + abort "rspec is not installed. bundle install first to make sure all dependencies are installed." + end +end + +begin + require "chefstyle" + require "rubocop/rake_task" + desc "Run Chefstyle tests" + RuboCop::RakeTask.new(:style) do |task| + task.options += ["--display-cop-names", "--no-color"] + end +rescue LoadError + puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed." +end begin require "yard" @@ -13,3 +37,5 @@ task :console do ARGV.clear IRB.start end + +task default: %i{style spec} |