Sha256: 8d8f4e033d301b95459008c877a9a48233546965548f6c0b4725865f97267bce

Contents?: true

Size: 971 Bytes

Versions: 162

Compression:

Stored size: 971 Bytes

Contents

spec_defaults = lambda do |spec|
  spec.pattern    = 'spec/**/*_spec.rb'
  spec.libs      << 'lib' << 'spec'
  spec.spec_opts << '--options' << 'spec/spec.opts'
end

begin
  require 'spec/rake/spectask'

  Spec::Rake::SpecTask.new(:spec, &spec_defaults)
rescue LoadError
  task :spec do
    abort 'rspec is not available. In order to run spec, you must: gem install rspec'
  end
end

begin
  require 'rcov'
  require 'spec/rake/verify_rcov'

  Spec::Rake::SpecTask.new(:rcov) do |rcov|
    spec_defaults.call(rcov)
    rcov.rcov      = true
    rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
  end

  RCov::VerifyTask.new(:verify_rcov => :rcov) do |rcov|
    rcov.threshold = 100
  end
rescue LoadError
  %w[ rcov verify_rcov ].each do |name|
    task name do
      abort "rcov is not available. In order to run #{name}, you must: gem install rcov"
    end
  end
end

task :spec => :check_dependencies
task :rcov => :check_dependencies

task :default => :spec

Version data entries

162 entries across 162 versions & 37 rubygems

Version Path
dm-is-tree-1.0.2 tasks/spec.rake
dm-is-state_machine-1.0.2 tasks/spec.rake
dm-is-searchable-1.0.2 tasks/spec.rake
dm-is-remixable-1.0.2 tasks/spec.rake
dm-is-nested_set-1.0.2 tasks/spec.rake
dm-is-list-1.0.2 tasks/spec.rake
dm-constraints-1.0.2 tasks/spec.rake
dm-cli-1.0.2 tasks/spec.rake
dm-ar-finders-1.0.2 tasks/spec.rake
dm-aggregates-1.0.2 tasks/spec.rake
dm-adjust-1.0.2 tasks/spec.rake
dm-yaml-adapter-1.0.2 tasks/spec.rake
dm-sqlserver-adapter-1.0.2 tasks/spec.rake
dm-oracle-adapter-1.0.2 tasks/spec.rake
dm-sqlite-adapter-1.0.2 tasks/spec.rake
dm-postgres-adapter-1.0.2 tasks/spec.rake
dm-mysql-adapter-1.0.2 tasks/spec.rake
dm-transactions-1.0.2 tasks/spec.rake
dm-active_model-1.0.2 tasks/spec.rake
dm-core-1.0.2 tasks/spec.rake