This repository has been archived by the owner on Nov 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Rakefile
53 lines (46 loc) · 1.46 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
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "rspec-rails23"
s.summary = "Rspec Rails for 2.3.5"
s.email = "rsanheim@gmail.com"
s.homepage = "http://github.com/rsanheim/rspec-rails23"
s.description = "Rails 2.3.5 Extension for Rspec 2"
s.authors = ["Rob Sanheim"]
s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"]
s.add_dependency "actionpack", '~> 2.3.0'
s.add_dependency "rspec", '= 2.0.0.beta.8'
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler"
end
require 'rspec/core/rake_task'
desc "Run all specs"
RSpec::Core::RakeTask.new :spec do |t|
t.pattern = "spec/**/*_spec.rb"
end
namespace :spec do
desc "Run all specs using rcov"
RSpec::Core::RakeTask.new :coverage do |t|
t.pattern = "spec/**/*_spec.rb"
t.rcov = true
t.rcov_opts = %[--exclude "spec/*,gems/*,db/*,/Library/Ruby/*,config/*" --text-summary --sort coverage]
end
end
task :default => [:spec]
begin
%w{sdoc sdoc-helpers rdiscount}.each { |name| gem name }
require 'sdoc_helpers'
rescue LoadError => ex
puts "sdoc support not enabled:"
puts ex.inspect
end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ''
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "Rspec-Rails #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end