2 require 'rake/testtask'
3 require 'rake/rdoctask'
5 desc 'Default: run unit tests.'
6 task :default => [:clean_log, :test]
8 desc 'Remove the old log file'
10 "rm -f #{File.dirname(__FILE__)}/test/debug.log" if File.exists?(File.dirname(__FILE__) + '/test/debug.log')
13 desc 'Test the validates_email_format_of plugin.'
14 Rake::TestTask.new(:test) do |t|
16 t.pattern = 'test/**/*_test.rb'
20 desc 'Generate documentation for the validates_email_format_of plugin.'
21 Rake::RDocTask.new(:rdoc) do |rdoc|
22 rdoc.rdoc_dir = 'rdoc'
23 rdoc.title = 'validates_email_format_of plugin'
24 rdoc.options << '--line-numbers --inline-source'
25 rdoc.rdoc_files.include('README')
26 rdoc.rdoc_files.include('TODO')
27 rdoc.rdoc_files.include('lib/**/*.rb')