Permalink
Browse files

Put RCov into the Spec.rake again

This didn't work. `spec_defaults` is needed by both files.
  • Loading branch information...
1 parent b57cc14 commit 19a56a606d2618d769410c6353eb2b5b72792bd0 @moonglum moonglum committed May 28, 2012
Showing with 18 additions and 17 deletions.
  1. +1 −1 Rakefile
  2. +0 −16 tasks/metrics/rcov.rake
  3. +17 −0 tasks/spec.rake
View
@@ -6,4 +6,4 @@ require File.expand_path('../lib/veritas/version', __FILE__)
FileList['tasks/**/*.rake'].each { |task| import task }
-task :default => :spec
+task :default => :spec
View
@@ -1,16 +0,0 @@
-begin
- require 'rcov'
-
- namespace :metrics do
- Spec::Rake::SpecTask.new(:rcov) do |rcov|
- spec_defaults.call(rcov)
- rcov.rcov = true
- rcov.pattern = 'spec/unit/**/*_spec.rb'
- rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
- end
- end
-rescue LoadError
- task :rcov do
- $stderr.puts 'rcov is not available. In order to run rcov, you must: gem install rcov'
- end
-end
View
@@ -29,4 +29,21 @@ rescue LoadError
end
end
+begin
+ require 'rcov'
+
+ namespace :metrics do
+ Spec::Rake::SpecTask.new(:rcov) do |rcov|
+ spec_defaults.call(rcov)
+ rcov.rcov = true
+ rcov.pattern = 'spec/unit/**/*_spec.rb'
+ rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
+ end
+ end
+rescue LoadError
+ task :rcov do
+ $stderr.puts 'rcov is not available. In order to run rcov, you must: gem install rcov'
+ end
+end
+
task :test => :spec

0 comments on commit 19a56a6

Please sign in to comment.