Skip to content
Newer
Older
100644 73 lines (59 sloc) 2.01 KB
0607826 Added rake test task
tsaleh authored Mar 14, 2007
1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored Sep 14, 2008
4 require 'rake/gempackagetask'
18229ed @rmm5t Moved VERSION constant into a more discoverable file
rmm5t authored Jan 9, 2009
5
6 $LOAD_PATH.unshift("lib")
7 require 'shoulda'
27cd4d2 @rmm5t Updated Rakefile to avoid future regression of shoulda/tasks problems [
rmm5t authored Sep 15, 2008
8 load 'tasks/shoulda.rake'
0607826 Added rake test task
tsaleh authored Mar 14, 2007
9
9b6dac2 more refactorings
tsaleh authored Jul 22, 2007
10 # Test::Unit::UI::VERBOSE
3c6fb6e @jferris Fixed failing matcher tests
jferris authored Jan 22, 2009
11 test_files_pattern = 'test/{unit,functional,other,matchers}/**/*_test.rb'
0607826 Added rake test task
tsaleh authored Mar 14, 2007
12 Rake::TestTask.new do |t|
3a8b77d - completely refactored the test system to use a fake rails_root
tsaleh authored Jul 14, 2007
13 t.libs << 'lib'
e1a5426 @rmm5t Added 'rake coverage' for an rcov report
rmm5t authored Jul 1, 2008
14 t.pattern = test_files_pattern
9b6dac2 more refactorings
tsaleh authored Jul 22, 2007
15 t.verbose = false
0607826 Added rake test task
tsaleh authored Mar 14, 2007
16 end
17
1ecd029 - documentation
tsaleh authored Apr 5, 2007
18 Rake::RDocTask.new { |rdoc|
19 rdoc.rdoc_dir = 'doc'
e9eba10 documentation and fixes to :through test
tsaleh authored Aug 7, 2007
20 rdoc.title = "Shoulda -- Making tests easy on the fingers and eyes"
2b8d59f @rmm5t --inline-source is no longer an option in rdoc v2.4
rmm5t authored Feb 28, 2009
21 rdoc.options << '--line-numbers'
1ecd029 - documentation
tsaleh authored Apr 5, 2007
22 rdoc.template = "#{ENV['template']}.rb" if ENV['template']
5e42226 fixed order of doc files
Tammer Saleh authored Jun 17, 2008
23 rdoc.rdoc_files.include('README.rdoc', 'CONTRIBUTION_GUIDELINES.rdoc', 'lib/**/*.rb')
1ecd029 - documentation
tsaleh authored Apr 5, 2007
24 }
25
e1a5426 @rmm5t Added 'rake coverage' for an rcov report
rmm5t authored Jul 1, 2008
26 desc "Run code-coverage analysis using rcov"
27 task :coverage do
28 rm_rf "coverage"
29 files = Dir[test_files_pattern]
30 system "rcov --rails --sort coverage -Ilib #{files.join(' ')}"
31 end
32
037e9c8 Added task to sync docs to dev.thoughtbot.com
tsaleh authored Jul 24, 2007
33 desc 'Update documentation on website'
34 task :sync_docs => 'rdoc' do
35 `rsync -ave ssh doc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/shoulda`
36 end
37
0607826 Added rake test task
tsaleh authored Mar 14, 2007
38 desc 'Default: run tests.'
39 task :default => ['test']
4b39f00 - moved rake tasks to shoulda namespace
tsaleh authored Nov 8, 2007
40
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored Sep 14, 2008
41 spec = Gem::Specification.new do |s|
42 s.name = "shoulda"
5c1329f @webmat Removed all ThoughtBot (and Thoughtbot) namespaces
webmat authored Jan 5, 2009
43 s.version = Shoulda::VERSION
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored Sep 14, 2008
44 s.summary = "Making tests easy on the fingers and eyes"
45 s.homepage = "http://thoughtbot.com/projects/shoulda"
46 s.rubyforge_project = "shoulda"
47
44a8206 @rmm5t Version bump to 2.0.4 to maintain consistency with VERSION constant
rmm5t authored Oct 7, 2008
48 s.files = FileList["[A-Z]*", "{bin,lib,rails,test}/**/*"]
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored Sep 14, 2008
49 s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }
4b39f00 - moved rake tasks to shoulda namespace
tsaleh authored Nov 8, 2007
50
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored Sep 14, 2008
51 s.has_rdoc = true
52 s.extra_rdoc_files = ["README.rdoc", "CONTRIBUTION_GUIDELINES.rdoc"]
2b8d59f @rmm5t --inline-source is no longer an option in rdoc v2.4
rmm5t authored Feb 28, 2009
53 s.rdoc_options = ["--line-numbers", "--main", "README.rdoc"]
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored Sep 14, 2008
54
55 s.authors = ["Tammer Saleh"]
56 s.email = "tsaleh@thoughtbot.com"
57 end
58
59 Rake::GemPackageTask.new spec do |pkg|
60 pkg.need_tar = true
61 pkg.need_zip = true
62 end
63
64 desc "Clean files generated by rake tasks"
65 task :clobber => [:clobber_rdoc, :clobber_package]
66
67 desc "Generate a gemspec file for GitHub"
68 task :gemspec do
69 File.open("#{spec.name}.gemspec", 'w') do |f|
70 f.write spec.to_ruby
71 end
72 end
Something went wrong with that request. Please try again.