Skip to content

Commit

Permalink
Unit tests now run with rspec 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Jan 28, 2011
1 parent 906eac8 commit 3c9b86a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
3 changes: 1 addition & 2 deletions Rakefile
Expand Up @@ -4,8 +4,7 @@ require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'spec/rake/spectask'


Dir['tasks/**/*.rake'].each { |rake| load rake }

task :default => 'test:unit'
24 changes: 3 additions & 21 deletions tasks/tests.rake
@@ -1,23 +1,5 @@
desc "Run all tests"
Spec::Rake::SpecTask.new('test:unit') do |t|
t.rcov = false
t.spec_opts << '--format' << 'html:spec.html'
t.spec_opts << '--format' << 'progress'
t.spec_opts << '-b'
t.spec_files = FileList['test/unit/*_spec.rb']
end
require 'rspec/core/rake_task'

Spec::Rake::SpecTask.new('test:rcov') do |t|
begin
require 'rcov'
t.rcov = true
t.rcov_opts = ['--exclude', '/var/lib/gems']
rescue LoadError
t.rcov = false
end
t.spec_opts << '--format' << 'html:spec.html'
t.spec_opts << '--format' << 'progress'
t.spec_opts << '-b'
t.spec_files = FileList['test/unit/*_spec.rb']
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'test/unit/*_spec.rb'
end

0 comments on commit 3c9b86a

Please sign in to comment.