Permalink
Browse files

Added rake task to run rspec tests. [#7 state:resolved]

  • Loading branch information...
Stephen Anderson
Stephen Anderson committed Sep 27, 2008
1 parent a12b137 commit c8f4c941e38a303371202b79b1a96bd3903e90f2
Showing with 17 additions and 9 deletions.
  1. +14 −9 Rakefile
  2. +3 −0 spec/spec.opts
View
@@ -1,15 +1,20 @@
require 'rake'
-require 'rake/testtask'
+require 'spec/rake/spectask'
+# require 'rake/testtask'
require 'rake/rdoctask'
-desc 'Default: run unit tests.'
-task :default => :test
+desc 'Default: run spec tests.'
+task :default => :spec
-desc 'Test the html_matchers plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
+desc "Run all specs"
+Spec::Rake::SpecTask.new do |t|
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.spec_opts = ['--options', 'spec/spec.opts']
+ # unless ENV['NO_RCOV']
+ # t.rcov = true
+ # t.rcov_dir = 'coverage'
+ # t.rcov_opts = ['--exclude', 'lib/spec.rb,lib/spec/runner.rb,spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest']
+ # end
end
desc 'Generate documentation for the html_matchers plugin.'
@@ -19,4 +24,4 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
-end
+end
View
@@ -0,0 +1,3 @@
+--colour
+--format profile
+--timeout 20

0 comments on commit c8f4c94

Please sign in to comment.