Permalink
Browse files

Finish switch to rspec...

"I SHOULD READ THE MANUAL" * 300
  • Loading branch information...
JonathanTron committed Aug 4, 2009
1 parent 14765c7 commit f1da83eb652fd848ffa0fd845fe68d5a129af713
Showing with 12 additions and 20 deletions.
  1. +10 −19 Rakefile
  2. +2 −1 spec/spec_helper.rb
View
@@ -16,28 +16,20 @@ rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
-require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/*_test.rb'
- test.verbose = true
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
end
-begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |test|
- test.libs << 'test'
- test.pattern = 'test/**/*_test.rb'
- test.verbose = true
- end
-rescue LoadError
- task :rcov do
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
- end
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
end
-task :default => :test
+task :default => :spec
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
@@ -49,8 +41,7 @@ Rake::RDocTask.new do |rdoc|
end
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "rspec_sequel_matchers #{version}"
+ rdoc.title = "test #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
-
View
@@ -2,7 +2,8 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-require 'test'
+
+require 'rspec_sequel_matchers'
Spec::Runner.configure do |config|

0 comments on commit f1da83e

Please sign in to comment.