Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (44 sloc) 1.45 KB
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'shoulda'
load 'tasks/shoulda.rake'
# Test::Unit::UI::VERBOSE
test_files_pattern = 'test/{unit,functional,other,matchers}/**/*_test.rb' do |t|
t.libs << 'lib' << 'test'
t.pattern = test_files_pattern
t.verbose = false
end { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = "Shoulda -- Making tests easy on the fingers and eyes"
rdoc.options << '--line-numbers'
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
rdoc.rdoc_files.include('README.rdoc', 'CONTRIBUTION_GUIDELINES.rdoc', 'lib/**/*.rb')
desc "Run code-coverage analysis using rcov"
task :coverage do
rm_rf "coverage"
files = Dir[test_files_pattern]
system "rcov --rails --sort coverage -Ilib #{files.join(' ')}"
desc 'Update documentation on website'
task :sync_docs => 'rdoc' do
`rsync -ave ssh doc/`
desc 'Default: run tests for all supported versions of Rails'
task :default do
%w(2.3.8 3.0.0.beta3).each do |version|
system("RAILS_VERSION=#{version} rake -s test;")
eval("$specification = begin; #{'shoulda.gemspec')}; end") $specification do |pkg|
pkg.need_tar = true
pkg.need_zip = true
desc "Clean files generated by rake tasks"
task :clobber => [:clobber_rdoc, :clobber_package]
Something went wrong with that request. Please try again.