Sha256: 69e4f3f86f1408e35686e4feb6c98ed899c4f907d82dc722060aeec58c429812

Contents?: true

Size: 1.35 KB

Versions: 12

Compression:

Stored size: 1.35 KB

Contents

begin
  require 'spec'
rescue LoadError
  require 'rubygems'
  require 'spec'
end
begin
  require 'spec/rake/spectask'
rescue LoadError
  puts <<-EOS
To use rspec for testing you must install rspec gem:
    gem install rspec
EOS
  exit(0)
end

desc "Run all specs"
Spec::Rake::SpecTask.new do |t|
  t.spec_opts = ['--options', "spec/spec.opts"]
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.ruby_opts << "-rubygems"
end

namespace :spec do
  desc "Run all specs in the presence of ActiveSupport"
  Spec::Rake::SpecTask.new(:with_active_support) do |t|
    t.spec_opts = ['--options', "spec/spec.opts"]
    t.spec_files = FileList['spec/**/*_spec.rb']
    t.ruby_opts << "-r #{File.join(File.dirname(__FILE__), *%w[gem_loader load_active_support])}"
  end

  desc "Run all specs in the presence of the tzinfo gem"
  Spec::Rake::SpecTask.new(:with_tzinfo_gem) do |t|
    t.spec_opts = ['--options', "spec/spec.opts"]
    t.spec_files = FileList['spec/**/*_spec.rb']
    t.ruby_opts << "-r #{File.join(File.dirname(__FILE__), *%w[gem_loader load_tzinfo_gem])}"
  end
end

if RUBY_VERSION.match(/^1\.8\./)
  desc 'Run all specs with RCov'
  Spec::Rake::SpecTask.new(:rcov) do |t|
    t.spec_opts = ['--options', "spec/spec.opts"]
    t.spec_files = FileList['spec/**/*_spec.rb']
    t.rcov = true
    t.rcov_dir = "coverage"
    t.rcov_opts = ['--exclude', 'spec']
  end
end
  

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
rubyredrick-ri_cal-0.0.10 tasks/spec.rake
rubyredrick-ri_cal-0.0.11 tasks/spec.rake
rubyredrick-ri_cal-0.0.8 tasks/spec.rake
rubyredrick-ri_cal-0.0.9 tasks/spec.rake
rubyredrick-ri_cal-0.5.0 tasks/spec.rake
rubyredrick-ri_cal-0.5.1 tasks/spec.rake
rubyredrick-ri_cal-0.5.2 tasks/spec.rake
rubyredrick-ri_cal-0.5.3 tasks/spec.rake
ri_cal-0.5.1 tasks/spec.rake
ri_cal-0.5.2 tasks/spec.rake
ri_cal-0.5.0 tasks/spec.rake
ri_cal-0.5.3 tasks/spec.rake