Permalink
Browse files

Update RSpec usage from 1.x to 2.x

  • Loading branch information...
1 parent 5c253dc commit af3d46f3e992ff6c388bc8f93e9387cf91aeb9fa Justin Langhorst committed Apr 22, 2011
Showing with 9 additions and 12 deletions.
  1. +9 −12 tasks/spec.rake
View
@@ -1,25 +1,22 @@
-require 'spec/rake/spectask'
+require 'rspec/core/rake_task'
desc "Run all specifications"
-Spec::Rake::SpecTask.new(:spec) do |t|
- t.libs << "lib"
- t.spec_opts = ["--color", "--require", "spec/spec_helper.rb"]
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.rspec_opts = ["--color"]
end
namespace :spec do
desc "Run all specifications verbosely"
- Spec::Rake::SpecTask.new(:verbose) do |t|
- t.libs << "lib"
- t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
+ RSpec::Core::RakeTask.new(:verbose) do |t|
+ t.rspec_opts = ["--color", "--format", "documentation"]
end
desc "Run specific specification verbosely (specify SPEC)"
- Spec::Rake::SpecTask.new(:select) do |t|
- t.libs << "lib"
- t.spec_files = [ENV["SPEC"]]
- t.spec_opts = ["--color", "--format", "specdoc", "--require", "spec/spec_helper.rb"]
+ RSpec::Core::RakeTask.new(:select) do |t|
+ t.pattern = [ENV["SPEC"]]
+ t.rspec_opts = ["--color", "--format", "documentation"]
end
-end
+end

0 comments on commit af3d46f

Please sign in to comment.