Sha256: 00247f0a0e3b79dba7a4c5b99040f7465132fad9ff5e53cf9e42b293d68b2e2e

Contents?: true

Size: 1.34 KB

Versions: 487

Compression:

Stored size: 1.34 KB

Contents

if HAVE_SPEC_RAKE_SPECTASK and not PROJ.spec.files.to_a.empty?
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.spec.files
    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.spec.files
    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.spec.files
      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
    remove_desc_for_task %w(spec:clobber_rcov)
  end

end  # namespace :spec

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

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

end  # if HAVE_SPEC_RAKE_SPECTASK

# EOF

Version data entries

487 entries across 472 versions & 111 rubygems

Version Path
rbkb-0.7.1 tasks/spec.rake
rbkb-0.7.0 tasks/spec.rake
test-construct-1.2.2 tasks/spec.rake
test-construct-1.2.1 tasks/spec.rake
classiccms-0.7.2 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.7.1 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.7.0 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.9 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.8 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.7 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/ffi-1.1.5/tasks/spec.rake
classiccms-0.6.6 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.5 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.4 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.3 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.2 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.1 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.6.0 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.5.17 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake
classiccms-0.5.16 vendor/bundle/gems/ffi-1.0.11/tasks/spec.rake