Sha256: 684b286f6ba00e40bc6a2a7d6d27aa213262047893808ec95cb7c1cb66c955ab

Contents?: true

Size: 1023 Bytes

Versions: 4

Compression:

Stored size: 1023 Bytes

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 the specs under spec/models"
Spec::Rake::SpecTask.new do |t|
  t.spec_opts = ['--options', "spec/spec.opts"]
  t.spec_files = FileList['spec/**/*_spec.rb']
end

namespace :spec do
  desc "Start Autotest"
  task :autotest do
    require File.join(File.dirname(__FILE__), '..', 'spec', 'rspec_autotest')
    RspecAutotest.run
  end
  
  desc "run 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 = './doc/coverage'
    t.rcov_opts = ['--exclude', 'spec\/spec_helper.rb,spec\/rspec_autotest.rb']
  end
end

# desc "Default task is to run specs"
# task :default => :spec
Rake.application[:default].prerequisites.gsub! /test/, 'spec'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
couchobject-0.0.1 tasks/rspec.rake
couchobject-0.5.0 tasks/rspec.rake
couchobject-0.6.0 tasks/rspec.rake
couchobject-0.6.1 tasks/rspec.rake