Rakefile in puppet-modulebuilder-1.0.0 vs Rakefile in puppet-modulebuilder-1.1.0
- old
+ new
@@ -5,10 +5,24 @@
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/unit/**/*_spec.rb'
end
+namespace :spec do
+ desc 'Run RSpec code examples with coverage collection'
+ task :coverage do
+ ENV['COVERAGE'] = 'yes'
+ Rake::Task['spec'].execute
+ end
+end
+
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance/**/*_spec.rb'
end
-task default: [:spec, :acceptance]
+task default: %i[spec acceptance]
+
+begin
+ require 'voxpupuli/rubocop/rake'
+rescue LoadError
+ # the voxpupuli-rubocop gem is optional
+end