summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2009-01-06 16:00:11 -0800
committerAdam Jacob <adam@hjksolutions.com>2009-01-06 16:00:11 -0800
commitfef7342c034a680c3c8ee90d388bf6a345d1d4e7 (patch)
tree4c897a8e09041268fff3ed1be3396e6180a46930 /tasks
parent353d44156869a4f6eace20317a11bc4d5a82d4c1 (diff)
downloadohai-fef7342c034a680c3c8ee90d388bf6a345d1d4e7.tar.gz
Updating specs for ohai to reflect streamlined plugin architecture, added rcov support
Diffstat (limited to 'tasks')
-rw-r--r--tasks/rspec.rake21
1 files changed, 20 insertions, 1 deletions
diff --git a/tasks/rspec.rake b/tasks/rspec.rake
index 2415fa49..61dc9d85 100644
--- a/tasks/rspec.rake
+++ b/tasks/rspec.rake
@@ -14,8 +14,27 @@ EOS
exit(0)
end
-desc "Run the specs under spec/models"
+desc "Run the specs under spec"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
end
+
+namespace :spec do
+ desc "Run all specs in spec directory with RCov"
+ Spec::Rake::SpecTask.new(:rcov) do |t|
+ t.spec_opts = ['--options', "spec/spec.opts"]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.rcov = true
+ t.rcov_opts = lambda do
+ IO.readlines("spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
+ end
+ end
+
+ desc "Print Specdoc for all specs"
+ Spec::Rake::SpecTask.new(:doc) do |t|
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ end
+end
+