forked from johncblandii/tabulous
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
49 lines (44 loc) · 1.36 KB
/
Rakefile
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
39
40
41
42
43
44
45
46
47
48
49
# -*- encoding: utf-8 -*-
require 'rubygems'
require 'bundler'
Bundler::GemHelper.install_tasks
require 'colored'
require 'rake'
require 'rake/rdoctask'
require 'rake/testtask'
namespace :test do
desc "run unit tests for tabulous"
Rake::TestTask.new(:units) do |t|
t.libs << 'lib'
t.pattern = 'test/units/**/*_test.rb'
t.verbose = true
end
end
task :test do
# we cannot load more than one Rails app at a time so we run the rake tasks
# from the shell so that each has its own process
Dir['test/applications/rails30/*'].each do |filename|
if File.directory?(filename)
name = filename.split('/').last
puts "Running tests for the Rails 3.0 test application \"#{name}\"".magenta
puts %x{cd #{filename} && bundle exec rake test}
end
end
Dir['test/applications/rails31/*'].each do |filename|
if File.directory?(filename)
name = filename.split('/').last
puts "Running tests for the Rails 3.1 test application \"#{name}\"".magenta
puts %x{cd #{filename} && bundle exec rake test}
end
end
puts "Running unit tests".magenta
Rake::Task['test:units'].invoke
end
task :default => :test
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Test'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end