Sha256: e29109328dca619c52b51dd8e17c15fac0019fb533cc952f668807891934e337

Contents?: true

Size: 1.32 KB

Versions: 7

Compression:

Stored size: 1.32 KB

Contents

require 'rake'
require 'spec/rake/spectask'
require 'rake/testtask'
require 'rake/rdoctask'

task :default  => [:spec, :test, :cleanup_test]
desc "Update vendor directory and run tests"
task :ci => ["poolparty:vendor:setup", "poolparty:vendor:update", :spec, :test]

task :cleanup_test do
  ::FileUtils.rm_rf "/tmp/poolparty"
end

Spec::Rake::SpecTask.new(:spec) do |t|
  t.warning = t.rcov = false
  t.spec_files = Dir["spec/**/*_spec.rb"]
end

Spec::Rake::SpecTask.new(:spec_v) do |t|
  t.rcov = true
  t.rcov_opts = ['--exclude', 'gems*,spec*,website*,test*']
  t.ruby_opts = []
  t.spec_files = Dir["spec/**/*_spec.rb"]
end

# task :test do
#   sh "ruby -Ilib:test #{Dir["#{File.dirname(__FILE__)}/../test/poolparty/*/*.rb"].join(" ")}"
# end

Rake::TestTask.new(:test) do |t|
  t.test_files = FileList['test/poolparty/**/*_test.rb']
  t.warning = false
  t.verbose = false
end

begin
  require 'rcov/rcovtask'
 
  Rcov::RcovTask.new(:rcov) do |t|
    t.libs << FileList['lib/poolparty/**/*.rb']
    dot_rakes = 
    t.rcov_opts = [
      '-xRakefile', '-xrakefile',
      '-xlib/erlang',
      '--text-report',
      '--sort coverage'
    ] + FileList['tasks/*.rake'].pathmap("-x%p")
    t.test_files = FileList['test/poolparty/**/*_test.rb']
    t.output_dir = 'coverage'
    t.verbose = true
  end
rescue LoadError
  puts "RCov is not available"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
auser-poolparty-1.2.10 tasks/spec.rake
auser-poolparty-1.2.11 tasks/spec.rake
auser-poolparty-1.2.3 tasks/spec.rake
auser-poolparty-1.2.4 tasks/spec.rake
auser-poolparty-1.2.7 tasks/spec.rake
auser-poolparty-1.2.8 tasks/spec.rake
auser-poolparty-1.2.9 tasks/spec.rake