summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-05-25 19:16:05 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-05-25 19:16:05 +0200
commit32138e365d849dedc5d93251445379d959eae6a7 (patch)
tree1028a58a6043c7cd0427d6464b99085b2715f239
parentf88363c56b337a3aa29d71ee9f8bf11962e01207 (diff)
downloadskeletons-32138e365d849dedc5d93251445379d959eae6a7.zip
skeletons-32138e365d849dedc5d93251445379d959eae6a7.tar.gz
use ENV[pattern] to drive spec execution
-rw-r--r--tasks/spec.rake23
1 files changed, 4 insertions, 19 deletions
diff --git a/tasks/spec.rake b/tasks/spec.rake
index 6652bbf..7345f5c 100644
--- a/tasks/spec.rake
+++ b/tasks/spec.rake
@@ -6,24 +6,24 @@ require 'rspec/core/rake_task'
namespace :spec do
desc 'Run all specs with basic output'
- RSpec::Core::RakeTask.new(:run) do |t|
+ RSpec::Core::RakeTask.new(:run) do |t,args|
t.ruby_opts = PROJ.ruby_opts
t.rspec_opts = PROJ.spec.opts
-# t.libs += PROJ.libs
+ t.pattern = ENV['pattern'] if ENV['pattern']
end
desc 'Run all specs with text output'
RSpec::Core::RakeTask.new(:doc) do |t|
t.ruby_opts = PROJ.ruby_opts
t.rspec_opts = PROJ.spec.opts + ['-fs' ]
-# t.libs += PROJ.libs
+ t.pattern = ENV['pattern'] if ENV['pattern']
end
desc 'Run all specs with html output'
RSpec::Core::RakeTask.new(:html) do |t|
t.ruby_opts = PROJ.ruby_opts
t.rspec_opts = PROJ.spec.opts + ['-fh' ]
-# t.libs += PROJ.libs
+ t.pattern = ENV['pattern'] if ENV['pattern']
end
if HAVE_RCOV
@@ -31,20 +31,9 @@ namespace :spec do
RSpec::Core::RakeTask.new(:rcov) do |t|
t.ruby_opts = PROJ.ruby_opts
t.rspec_opts = PROJ.spec.opts
-# t.libs += PROJ.libs
t.rcov = true
-# t.rcov_path = PROJ.rcov.dir
t.rcov_opts = PROJ.rcov.opts + ['--exclude', 'spec']
end
-
-# RCov::VerifyTask.new(:verify) do |t|
-# t.threshold = PROJ.rcov.threshold
-# t.index_html = File.join(PROJ.rcov.dir, 'index.html')
-# t.require_exact_threshold = PROJ.rcov.threshold_exact
-# end
-
-# task :verify => :rcov
-# remove_desc_for_task %w(spec:clobber_rcov)
end
end # namespace :spec
@@ -52,8 +41,4 @@ end # namespace :spec
desc 'Alias to spec:run'
task :spec => 'spec:run'
-#task :clobber => 'spec:clobber_rcov' if HAVE_RCOV
-
-#end # if HAVE_SPEC_RAKE_SPECTASK
-
# EOF