vmpooler/Rakefile
Glenn Sarti 85a2fa4f20 (maint) Add rubocop for testing
This commit adds the rubocop gem, a rubocop rake task and an initial rubocop
configuration file in prepartion for using rubocop in CI.

This commit also adds a rubocop todo file that exempts existing files from
violations.
2017-02-10 13:33:36 -08:00

21 lines
538 B
Ruby

require 'rspec/core/rake_task'
require 'rubocop/rake_task'
desc 'Run rspec tests with coloring.'
RSpec::Core::RakeTask.new(:test) do |t|
t.rspec_opts = %w[--color --format documentation]
t.pattern = 'spec/'
end
desc 'Run rspec tests and save JUnit output to results.xml.'
RSpec::Core::RakeTask.new(:junit) do |t|
t.rspec_opts = %w[-r yarjuf -f JUnit -o results.xml]
t.pattern = 'spec/'
end
desc 'Run RuboCop'
RuboCop::RakeTask.new(:rubocop) do |task|
task.options << '--display-cop-names'
end
task :default => [:test]