Skip to content

Commit

Permalink
dear viking, please don't mess with rspec requirements in plugins. kthx.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Fuchs committed Jul 14, 2008
1 parent 5ca4655 commit 21a9cde
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions vendor/plugins/viking/tasks/rspec.rake
@@ -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

0 comments on commit 21a9cde

Please sign in to comment.