summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-05-29 12:28:51 -0700
committerTim Smith <tsmith84@gmail.com>2020-05-29 12:36:10 -0700
commit86afbbacdfc557bf98ee1d0b7eb0d4b1070e6af2 (patch)
tree051b3a05233d73e0a565dbde7397d79780189b7c /tasks
parentae85055e3e7d4e0430382839a3e9fc5addb42ee6 (diff)
downloadchef-86afbbacdfc557bf98ee1d0b7eb0d4b1070e6af2.tar.gz
Pull in spec task / helper from master
We've changed up some things Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rw-r--r--tasks/rspec.rb18
1 files changed, 5 insertions, 13 deletions
diff --git a/tasks/rspec.rb b/tasks/rspec.rb
index d7e04767c6..c757d3565d 100644
--- a/tasks/rspec.rb
+++ b/tasks/rspec.rb
@@ -41,39 +41,31 @@ begin
task spec: :component_specs
- desc "Run standard specs (minus long running specs)"
+ desc "Run all specs in spec directory"
RSpec::Core::RakeTask.new(:spec) do |t|
+ t.verbose = false
t.rspec_opts = %w{--profile}
- # right now this just limits to functional + unit, but could also remove
- # individual tests marked long-running
t.pattern = FileList["spec/**/*_spec.rb"]
end
namespace :spec do
- desc "Run all specs in spec directory with RCov"
- RSpec::Core::RakeTask.new(:rcov) do |t|
- t.rspec_opts = %w{--profile}
- t.pattern = FileList["spec/**/*_spec.rb"]
- t.rcov = true
- t.rcov_opts = lambda do
- IO.readlines("#{CHEF_ROOT}/spec/rcov.opts").map { |l| l.chomp.split " " }.flatten
- end
- end
-
desc "Run all specs in spec directory"
RSpec::Core::RakeTask.new(:all) do |t|
+ t.verbose = false
t.rspec_opts = %w{--profile}
t.pattern = FileList["spec/**/*_spec.rb"]
end
desc "Print Specdoc for all specs"
RSpec::Core::RakeTask.new(:doc) do |t|
+ t.verbose = false
t.rspec_opts = %w{--format specdoc --dry-run --profile}
t.pattern = FileList["spec/**/*_spec.rb"]
end
desc "Run the specs under spec/unit with activesupport loaded"
RSpec::Core::RakeTask.new(:activesupport) do |t|
+ t.verbose = false
t.rspec_opts = %w{--require active_support/core_ext --profile}
# Only node_spec and role_spec specifically have issues, target those tests
t.pattern = FileList["spec/unit/node_spec.rb", "spec/unit/role_spec.rb"]