Skip to content
Browse files

Add integration_cov and spec_adapter_cov rake tasks for testing cover…

…age on a real database
  • Loading branch information...
1 parent 42211ef commit d064c987bf392cb16fe82439cc716dd707a0ea7a @jeremyevans jeremyevans committed Oct 3, 2009
Showing with 15 additions and 1 deletion.
  1. +15 −1 Rakefile
View
16 Rakefile
@@ -168,12 +168,26 @@ begin
t.spec_opts = spec_opts.call
end
+ desc "Run integration tests with coverage"
+ Spec::Rake::SpecTask.new("integration_cov") do |t|
+ t.spec_files = Dir["spec/integration/*_test.rb"]
+ t.spec_opts = spec_opts.call
+ t.rcov, t.rcov_opts = rcov_opts.call
+ end
+
%w'postgres sqlite mysql informix oracle firebird mssql'.each do |adapter|
- desc "Run #{adapter} specs without coverage"
+ desc "Run #{adapter} specs"
Spec::Rake::SpecTask.new("spec_#{adapter}") do |t|
t.spec_files = ["spec/adapters/#{adapter}_spec.rb"] + Dir["spec/integration/*_test.rb"]
t.spec_opts = spec_opts.call
end
+
+ desc "Run #{adapter} specs with coverage"
+ Spec::Rake::SpecTask.new("spec_#{adapter}_cov") do |t|
+ t.spec_files = ["spec/adapters/#{adapter}_spec.rb"] + Dir["spec/integration/*_test.rb"]
+ t.spec_opts = spec_opts.call
+ t.rcov, t.rcov_opts = rcov_opts.call
+ end
end
rescue LoadError
end

0 comments on commit d064c98

Please sign in to comment.
Something went wrong with that request. Please try again.