Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (32 sloc) 1.037 kb
0607826 Added rake test task
tsaleh authored
1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
4
9b6dac2 more refactorings
tsaleh authored
5 # Test::Unit::UI::VERBOSE
e1a5426 @rmm5t Added 'rake coverage' for an rcov report
rmm5t authored
6 test_files_pattern = 'test/{unit,functional,other}/**/*_test.rb'
0607826 Added rake test task
tsaleh authored
7 Rake::TestTask.new do |t|
3a8b77d - completely refactored the test system to use a fake rails_root
tsaleh authored
8 t.libs << 'lib'
e1a5426 @rmm5t Added 'rake coverage' for an rcov report
rmm5t authored
9 t.pattern = test_files_pattern
9b6dac2 more refactorings
tsaleh authored
10 t.verbose = false
0607826 Added rake test task
tsaleh authored
11 end
12
1ecd029 - documentation
tsaleh authored
13 Rake::RDocTask.new { |rdoc|
14 rdoc.rdoc_dir = 'doc'
e9eba10 documentation and fixes to :through test
tsaleh authored
15 rdoc.title = "Shoulda -- Making tests easy on the fingers and eyes"
1ecd029 - documentation
tsaleh authored
16 rdoc.options << '--line-numbers' << '--inline-source'
17 rdoc.template = "#{ENV['template']}.rb" if ENV['template']
5e42226 fixed order of doc files
Tammer Saleh authored
18 rdoc.rdoc_files.include('README.rdoc', 'CONTRIBUTION_GUIDELINES.rdoc', 'lib/**/*.rb')
1ecd029 - documentation
tsaleh authored
19 }
20
e1a5426 @rmm5t Added 'rake coverage' for an rcov report
rmm5t authored
21 desc "Run code-coverage analysis using rcov"
22 task :coverage do
23 rm_rf "coverage"
24 files = Dir[test_files_pattern]
25 system "rcov --rails --sort coverage -Ilib #{files.join(' ')}"
26 end
27
037e9c8 Added task to sync docs to dev.thoughtbot.com
tsaleh authored
28 desc 'Update documentation on website'
29 task :sync_docs => 'rdoc' do
30 `rsync -ave ssh doc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/shoulda`
31 end
32
0607826 Added rake test task
tsaleh authored
33 desc 'Default: run tests.'
34 task :default => ['test']
4b39f00 - moved rake tasks to shoulda namespace
tsaleh authored
35
36 Dir['tasks/*.rake'].each do |f|
37 load f
38 end
39
Something went wrong with that request. Please try again.