Skip to content
Browse files

Fix Rakefile to use the new rspec API

The :spec task now exists and is run by default for rake.
  • Loading branch information...
1 parent 32ac2de commit 3facc061932d13441e097e484465d73911e99dc8 @oneacross oneacross committed Apr 25, 2012
Showing with 6 additions and 9 deletions.
  1. +6 −9 Rakefile
View
15 Rakefile
@@ -60,22 +60,19 @@ Rake::RDocTask.new do |rdoc|
end
-if defined?(Spec)
+if defined?(RSpec)
desc 'Test the govkit plugin.'
- Spec::Rake::SpecTask.new('spec') do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.spec_opts = ["-c"]
+ RSpec::Core::RakeTask.new('spec') do |t|
+ t.rspec_opts = ["-c"]
end
desc 'Test the govkit plugin with specdoc formatting and colors'
- Spec::Rake::SpecTask.new('specdoc') do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.spec_opts = ["--format specdoc", "-c"]
+ RSpec::Core::RakeTask.new('specdoc') do |t|
+ t.rspec_opts = ["--format specdoc", "-c"]
end
desc "Run all examples with RCov"
- Spec::Rake::SpecTask.new('examples_with_rcov') do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
+ RSpec::Core::RakeTask.new('examples_with_rcov') do |t|
t.rcov = true
t.rcov_opts = ['--exclude', 'spec,Library']
end

0 comments on commit 3facc06

Please sign in to comment.
Something went wrong with that request. Please try again.