Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (36 sloc) 1.13 KB
require 'rubygems'
require 'bundler/setup'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
load 'tasks/shoulda.rake'
test_files_pattern = 'test/**/*_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-context -- Context framework for Test::Unit"
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(' ')}"
eval("$specification = begin; #{'shoulda-context.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]
desc 'Default: run tests'
task :default => [:test]
Jump to Line
Something went wrong with that request. Please try again.