Rakefile in encryptor-1.1.3 vs Rakefile in encryptor-1.3.0

- old
+ new

@@ -1,12 +1,9 @@ require 'rake' require 'rake/testtask' require 'rake/rdoctask' -desc 'Default: run unit tests' -task :default => :test - desc 'Test the encryptor gem' Rake::TestTask.new(:test) do |t| t.libs << 'lib' t.pattern = 'test/**/*_test.rb' t.verbose = true @@ -17,6 +14,20 @@ rdoc.rdoc_dir = 'rdoc' rdoc.title = 'Encryptor' rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') -end \ No newline at end of file +end + +if RUBY_VERSION < '1.9.3' + require 'rcov/rcovtask' + + task :rcov do + system "rcov -o coverage/rcov --exclude '^(?!lib)' " + FileList[ 'test/**/*_test.rb' ].join(' ') + end + + desc 'Default: run unit tests under rcov.' + task :default => :rcov +else + desc 'Default: run unit tests.' + task :default => :test +end