This repository has been archived by the owner on Mar 29, 2018. It is now read-only.
forked from gerrit/spec_integration
/
Rakefile
52 lines (45 loc) · 1.51 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
require 'rubygems'
require 'spec/rake/spectask'
task :default => :spec
desc "Run all specs"
task :spec => ["spec:libs:checkout"] do
require "#{RSPEC_ROOT}/lib/spec/rake/spectask"
Spec::Rake::SpecTask.new :spec do |t|
t.spec_opts = ['--options', "\"#{SPEC_ROOT}/spec.opts\""]
t.spec_files = FileList["#{SPEC_ROOT}/**/*_spec.rb"]
end
end
namespace :spec do
namespace :libs do
desc "Prepare workspace for running our specs"
task :checkout do
mkdir_p SUPPORT_LIB
libs = {
RSPEC_ROOT => "http://rspec.rubyforge.org/svn/trunk/rspec",
RSPEC_ON_RAILS_ROOT => "http://rspec.rubyforge.org/svn/trunk/rspec_on_rails",
ACTIONPACK_ROOT => "http://svn.rubyonrails.org/rails/trunk/actionpack/",
ACTIVESUPPORT_ROOT => "http://svn.rubyonrails.org/rails/trunk/activesupport/"
}
needed = libs.keys.select { |dir| not File.directory?(dir) }
if needed.empty?
puts "Support libraries are in place. Skipping checkout."
else
needed.each { |root| system "svn export #{libs[root]} #{root}" }
end
end
desc "Remove libs from tmp directory"
task :clean do
rm_rf SUPPORT_LIB
puts "cleaned #{SUPPORT_LIB}"
end
end
end
Rake::RDocTask.new(:doc) do |r|
r.title = "Rails Spec Integration Plugin"
r.main = "README"
r.options << "--line-numbers"
r.rdoc_files.include("README", "LICENSE", "lib/**/*.rb")
r.rdoc_dir = "doc"
end
task :default => :spec