Created
December 14, 2008 18:07
-
-
Save maxime/35743 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Run specifications' | |
Spec::Rake::SpecTask.new(:spec) do |t| | |
t.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts') | |
t.spec_files = Pathname.glob((ROOT + 'spec/**/*_spec.rb').to_s) | |
begin | |
t.rcov = ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true | |
t.rcov_opts << "--exclude 'config,spec,#{Gem::path.join(',')}'" | |
t.rcov_opts << '--text-summary' | |
t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse' | |
rescue Exception | |
# rcov not installed | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment