Skip to content

Commit

Permalink
New Rakefile to launch cucumber, specs, tests, rdoc, rcov.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Fouché committed Aug 5, 2009
1 parent cb1bd5e commit 90e4944
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
.DS_Store
coverage
rdoc
46 changes: 33 additions & 13 deletions Rakefile
@@ -1,19 +1,39 @@
require 'rake'
require 'rake/rdoctask'
require 'rake/testtask'
require 'rubygems'
require 'rspec'
require 'spec/rake/spectask'
require 'cucumber/rake/task'


task :default => :spec

Cucumber::Rake::Task.new do |t|
t.cucumber_opts = "--format pretty"
t.cucumber_opts = "spec/features --format pretty"
end

multiruby_path = `which multiruby`.chomp
if multiruby_path.length > 0 && Spec::Rake::SpecTask.instance_methods.include?("ruby_cmd")
namespace :spec do
desc "Run all specs with multiruby and ActiveSupport"
Spec::Rake::SpecTask.new(:multi) do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
t.ruby_cmd = multiruby_path
end
end
Spec::Rake::SpecTask.new(:rcov) do |t|
gem 'relevance-rcov', '>= 0.8.4.1'
t.spec_files = FileList['**/test/**/tc_*.rb', '**/spec/**/*_spec.rb']
t.rcov = true
t.rcov_opts = t.rcov_opts << ['--exclude', '/Library,/opt,/System']
end

Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_files = FileList['**/spec/**/*_spec.rb']
end

Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.pattern = '**/test/**/tc_*.rb'
t.verbose = true
t.warning = false
end

Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Mail'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end

0 comments on commit 90e4944

Please sign in to comment.