Skip to content

Commit e90f638

Browse files
committed
(maint) add a spec:unit rake task
This task can be used by developers for a quick check of their changes. This also includes switching the `Rake::Task[:spec_prep].invoke` to a task dependency to avoid double calls.
1 parent 9e55ce3 commit e90f638

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Rakefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ end
1414
require 'rspec/core/rake_task'
1515

1616
RSpec::Core::RakeTask.new(:spec) do |t|
17-
Rake::Task[:spec_prep].invoke
1817
# thanks to the fixtures/modules/ symlinks this needs to exclude fixture modules explicitely
1918
excludes = ['fixtures/**/*.rb,fixtures/modules/*/**/*.rb']
2019
if RUBY_PLATFORM == 'java'
@@ -24,12 +23,20 @@ RSpec::Core::RakeTask.new(:spec) do |t|
2423
t.exclude_pattern = "spec/{#{excludes.join ','}}"
2524
end
2625

26+
task :spec => :spec_prep
27+
2728
namespace :spec do
2829
desc 'Run RSpec code examples with coverage collection'
2930
task :coverage do
3031
ENV['SIMPLECOV'] = 'yes'
3132
Rake::Task['spec'].execute
3233
end
34+
35+
RSpec::Core::RakeTask.new(:unit) do |t|
36+
t.pattern = "spec/puppet/**/*_spec.rb,spec/integration/**/*_spec.rb"
37+
end
38+
39+
task :unit => :spec_prep
3340
end
3441

3542
#### LICENSE_FINDER ####

0 commit comments

Comments
 (0)