public
Description: RailsDB is a web application written in Ruby using the Ruby on Rails web framework. RailsDB provides a generic interface to popular databases such as MySQL, PostgreSQL, SQLite, and Oracle.
Homepage: http://railsdb.org/
Clone URL: git://github.com/gdonald/railsdb.git
Click here to lend your support to: railsdb and make a donation at www.pledgie.com !
Greg Donald (author)
Sun Jan 04 15:38:14 -0800 2009
railsdb / Rakefile
100644 38 lines (31 sloc) 1.18 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
 
require( File.join( File.dirname( __FILE__ ), 'config', 'boot' ) )
 
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
 
unless RAILS_ENV == 'production'
 
  require 'rcov/rcovtask'
 
  namespace :test do
    namespace :coverage do
      desc 'Delete aggregate coverage data.'
      task( :clean ){ rm_f 'coverage.data' }
    end
    desc 'Aggregate code coverage for unit, functional and integration tests'
    task :coverage => 'test:coverage:clean'
    #%w[ unit functional integration ].each do |target|
    %w[ unit functional ].each do |target|
      namespace :coverage do
        Rcov::RcovTask.new( target ) do |t|
          t.libs << 'test'
          t.test_files = FileList[ "test/#{ target }/*_test.rb" ]
          t.output_dir = "public/coverage/#{ target }"
          t.verbose = true
          t.rcov_opts << "--sort coverage --exclude gem,oci8 --rails --aggregate coverage.data"
        end
      end
      task :coverage => "test:coverage:#{ target }"
    end
  end
 
end