forked from parfait/acts_like_git
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
35 lines (30 loc) · 940 Bytes
/
Rakefile
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