Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dear viking, please don't mess with rspec requirements in plugins. kthx.
- Loading branch information
Sven Fuchs
committed
Jul 14, 2008
1 parent
5ca4655
commit 21a9cde
Showing
1 changed file
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
begin | ||
require 'spec' | ||
rescue LoadError | ||
require 'rubygems' | ||
require 'spec' | ||
end | ||
begin | ||
require 'spec/rake/spectask' | ||
rescue LoadError | ||
puts "To use RSpec for testing you must install its gem:\n\tgem install rspec" | ||
exit(0) | ||
end | ||
|
||
SPEC_OPTS_FILE = [ | ||
"-O", | ||
File.join(File.dirname(__FILE__), "..", "spec", "spec.opts") | ||
].join(" ") | ||
|
||
desc "Run all specs" | ||
Spec::Rake::SpecTask.new 'spec' do |t| | ||
t.spec_files = FileList["spec/**/*_spec.rb"] | ||
t.spec_opts = [SPEC_OPTS_FILE] | ||
end | ||
|
||
desc "Run all specs with RCov" | ||
Spec::Rake::SpecTask.new 'specs_with_rcov' do |t| | ||
t.spec_opts = [SPEC_OPTS_FILE] | ||
t.spec_files = FileList["spec/**/*_spec.rb"] | ||
t.rcov = true | ||
t.rcov_opts = ['--exclude', 'spec'] | ||
end | ||
# begin | ||
# require 'spec' | ||
# rescue LoadError | ||
# require 'rubygems' | ||
# require 'spec' | ||
# end | ||
# begin | ||
# require 'spec/rake/spectask' | ||
# rescue LoadError | ||
# puts "To use RSpec for testing you must install its gem:\n\tgem install rspec" | ||
# exit(0) | ||
# end | ||
# | ||
# SPEC_OPTS_FILE = [ | ||
# "-O", | ||
# File.join(File.dirname(__FILE__), "..", "spec", "spec.opts") | ||
# ].join(" ") | ||
# | ||
# desc "Run all specs" | ||
# Spec::Rake::SpecTask.new 'spec' do |t| | ||
# t.spec_files = FileList["spec/**/*_spec.rb"] | ||
# t.spec_opts = [SPEC_OPTS_FILE] | ||
# end | ||
# | ||
# desc "Run all specs with RCov" | ||
# Spec::Rake::SpecTask.new 'specs_with_rcov' do |t| | ||
# t.spec_opts = [SPEC_OPTS_FILE] | ||
# t.spec_files = FileList["spec/**/*_spec.rb"] | ||
# t.rcov = true | ||
# t.rcov_opts = ['--exclude', 'spec'] | ||
# end |