Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0d219eb10e
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (30 sloc) 0.94 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
require 'rake/rdoctask'
require 'spec/rake/spectask'
require 'rake/gempackagetask'

desc 'Default: run specs'
task :default => :spec

desc "Run the specs under spec"
Spec::Rake::SpecTask.new(:spec) do |t|
  t.spec_opts = ["--format", "progress", "--color"]
  t.spec_files = FileList['spec/**/*_spec.rb']
end

desc "Generate RCov reports"
Spec::Rake::SpecTask.new(:rcov) do |t|
  t.libs << 'lib'
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.rcov = true
  t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems', '--exclude', 'riddle']
end

desc "One file, one line, one spec."
Spec::Rake::SpecTask.new(:target) do |t|
  t.spec_opts = ["--format", "progress", "--color", "-l", ENV['line']]
  t.spec_files = FileList["spec/unit/#{ENV['unit']}_spec.rb"]
end

desc "Repeat the tests many times to find failures."
task :repeat do
  100.times do
    output = `rake spec --trace`
    puts output
    break unless output =~ /0 fail/
  end
end
Something went wrong with that request. Please try again.