Kevin Clark | 5a7103a | 2008-06-18 00:55:11 +0000 | [diff] [blame] | 1 | require 'rubygems' |
| 2 | require 'rake' |
| 3 | require 'spec/rake/spectask' |
| 4 | |
Kevin Clark | c2a07b1 | 2008-06-18 00:57:06 +0000 | [diff] [blame] | 5 | task :default => [:spec, :test] |
Kevin Clark | 5a7103a | 2008-06-18 00:55:11 +0000 | [diff] [blame] | 6 | |
| 7 | Spec::Rake::SpecTask.new("spec") do |t| |
| 8 | t.spec_files = FileList['spec/**/*_spec.rb'] |
| 9 | t.spec_opts = ['--color'] |
| 10 | end |
Kevin Clark | c2a07b1 | 2008-06-18 00:57:06 +0000 | [diff] [blame] | 11 | |
Kevin Clark | eb0dd7f | 2008-06-18 01:12:15 +0000 | [diff] [blame] | 12 | Spec::Rake::SpecTask.new("rcov_spec") do |t| |
| 13 | t.spec_files = FileList['spec/**/*_spec.rb'] |
| 14 | t.spec_opts = ['--color'] |
| 15 | t.rcov = true |
| 16 | t.rcov_opts = ['--exclude', '^spec,/gems/'] |
| 17 | end |
| 18 | |
Kevin Clark | c2a07b1 | 2008-06-18 00:57:06 +0000 | [diff] [blame] | 19 | task :test do |
| 20 | fork do |
| 21 | exec 'make', '-C', File.dirname(__FILE__) + "/../../test/rb" |
| 22 | end |
| 23 | Process.wait |
| 24 | end |