mirror of
https://github.com/puppetlabs/vmpooler-provider-vsphere.git
synced 2026-01-26 11:28:40 -05:00
This copies in all needed files from the main VMPooler repo. Version 1.3.0 of VMPooler was used as the basis for this code.
25 lines
666 B
Ruby
25 lines
666 B
Ruby
require 'rspec/core/rake_task'
|
|
|
|
rubocop_available = Gem::Specification::find_all_by_name('rubocop').any?
|
|
require 'rubocop/rake_task' if rubocop_available
|
|
|
|
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
|
|
|
|
if rubocop_available
|
|
desc 'Run RuboCop'
|
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
task.options << '--display-cop-names'
|
|
end
|
|
end
|
|
|
|
task :default => [:test]
|