tasks/rspec.rake
begin
require 'rspec'
rescue LoadError
require 'rubygems' unless ENV['NO_RUBYGEMS']
require 'rspec'
end
begin
require 'rspec/core/rake_task'
rescue LoadError
puts <<-EOS
To use rspec for testing you must install rspec gem:
gem install rspec
EOS
exit(0)
end
desc "Run all examples"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w[--color]
t.verbose = false
end
namespace :spec do
desc "Run rspec with RCov"
RSpec::Core::RakeTask.new('rcov') do |t|
t.rcov = true
t.rcov_opts = ['--exclude', '/home/alexd/.gems']
end
end