Sha256: ef2aecf42676e7f23bd6ff8d7b3cb503a1c5b96375222320eb0b39ade81b4cfc

Contents?: true

Size: 1.3 KB

Versions: 19

Compression:

Stored size: 1.3 KB

Contents

# $Id$

if HAVE_SPEC_RAKE_SPECTASK
require 'spec/rake/verify_rcov'

namespace :spec do

  desc 'Run all specs with basic output'
  Spec::Rake::SpecTask.new(:run) do |t|
    t.ruby_opts = PROJ.ruby_opts
    t.spec_opts = PROJ.spec_opts
    t.spec_files = PROJ.specs
    t.libs += PROJ.libs
  end

  desc 'Run all specs with text output'
  Spec::Rake::SpecTask.new(:specdoc) do |t|
    t.ruby_opts = PROJ.ruby_opts
    t.spec_opts = PROJ.spec_opts + ['--format', 'specdoc']
    t.spec_files = PROJ.specs
    t.libs += PROJ.libs
  end

  if HAVE_RCOV
    desc 'Run all specs with RCov'
    Spec::Rake::SpecTask.new(:rcov) do |t|
      t.ruby_opts = PROJ.ruby_opts
      t.spec_opts = PROJ.spec_opts
      t.spec_files = PROJ.specs
      t.libs += PROJ.libs
      t.rcov = true
      t.rcov_dir = PROJ.rcov_dir
      t.rcov_opts = PROJ.rcov_opts + ['--exclude', 'spec']
    end

    RCov::VerifyTask.new(:verify) do |t| 
      t.threshold = PROJ.rcov_threshold
      t.index_html = File.join(PROJ.rcov_dir, 'index.html')
      t.require_exact_threshold = PROJ.rcov_threshold_exact
    end

    task :verify => :rcov
  end

end  # namespace :spec

desc 'Alias to spec:run'
task :spec => 'spec:run'

task :clobber => 'spec:clobber_rcov' if HAVE_RCOV

remove_desc_for_task %w(spec:clobber_rcov)

end  # if HAVE_SPEC_RAKE_SPECTASK

# EOF

Version data entries

19 entries across 18 versions & 8 rubygems

Version Path
bones-1.3.5 data/tasks/spec.rake
bones-1.3.5 tasks/spec.rake
colour-0.1.0 tasks/spec.rake
colour-0.1.2 tasks/spec.rake
colour-0.1.1 tasks/spec.rake
hurl-0.0.3 tasks/spec.rake
hurl-0.0.4 tasks/spec.rake
ludy-0.1.11 tasks/spec.rake
rally_rest_api-0.7.10 tasks/spec.rake
rally_rest_api-0.7.9 tasks/spec.rake
rally_rest_api-0.7.8 tasks/spec.rake
rbvimeo-0.1.0 tasks/spec.rake
tournament-1.0.0 tasks/spec.rake
tournament-0.0.1 tasks/spec.rake
tournament-1.1.0 tasks/spec.rake
tournament-0.0.2 tasks/spec.rake
tournament-0.0.3 tasks/spec.rake
webby-0.8.1 tasks/spec.rake
webby-0.8.0 tasks/spec.rake