Skip to content

Commit

Permalink
Speed up the tests by leaving out ruby-debug by default and making th…
Browse files Browse the repository at this point in the history
…e default rake task not use rcov.
  • Loading branch information
chrislloyd committed Feb 12, 2009
1 parent 784a0df commit 184e5ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,31 @@ namespace :jruby do

end

file_list = FileList['spec/*_spec.rb']
spec_files = FileList['spec/*_spec.rb']

desc 'Default: run unit tests.'
task :default => 'spec'

task :specs => :spec
desc "Run all examples"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_opts = ['--color']
t.spec_files = spec_files
end

namespace :spec do
desc "Run all examples with RCov"
Spec::Rake::SpecTask.new('rcov') do |t|
t.spec_files = file_list
t.spec_files = spec_files
t.rcov = true
t.rcov_dir = "doc/coverage"
t.rcov_opts = ['--exclude', 'spec']
t.rcov_opts = ['--exclude', 'spec,rspec-*,rcov-*,gems']
t.spec_opts = ['--color']
end

desc "Generate an html report"
Spec::Rake::SpecTask.new('report') do |t|
t.spec_files = file_list
t.spec_files = spec_files
t.rcov = true
t.rcov_dir = "doc/coverage"
t.rcov_opts = ['--exclude', 'spec']
Expand All @@ -75,7 +85,3 @@ namespace :spec do
end

end


desc 'Default: run unit tests.'
task :default => 'spec:rcov'
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

require 'rubygems'
require 'active_record'
require 'ruby-debug'
# require 'ruby-debug' # Slows down the tests massively

require 'even_better_nested_set'

Expand Down

0 comments on commit 184e5ef

Please sign in to comment.