aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-16 21:13:32 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-17 13:17:07 -0400
commit49d119ae84bbb7cd180ca855cf48997dc731554c (patch)
tree3bae397d3e2b5ee76bd89a87ccbf421d814fec74 /Rakefile
parent4096d192a1e7cdf0115f5a4cf33d102b176cb8cd (diff)
downloadrails-49d119ae84bbb7cd180ca855cf48997dc731554c.tar.gz
rails-49d119ae84bbb7cd180ca855cf48997dc731554c.tar.bz2
rails-49d119ae84bbb7cd180ca855cf48997dc731554c.zip
Adding spec:mysql and spec:sqlite3 tasks
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile24
1 files changed, 20 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index b1fc74a13c..9292ac2533 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,15 +1,31 @@
require 'rubygems'
require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
-end
+spec_file_list = FileList['spec/**/*_spec.rb']
+desc "Run specs using RCov (uses mysql database adapter)"
Spec::Rake::SpecTask.new(:coverage) do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
+ t.spec_files =
+ ["spec/connections/mysql_connection.rb"] +
+ spec_file_list
t.rcov = true
t.rcov_opts = ['-x', 'spec,gems']
end
+namespace :spec do
+ for adapter in %w[mysql sqlite3]
+ desc "Run specs with the #{adapter} database adapter"
+ Spec::Rake::SpecTask.new(adapter) do |t|
+ t.spec_files =
+ ["spec/connections/#{adapter}_connection.rb"] +
+ ["spec/schemas/#{adapter}_schema.rb"] +
+ spec_file_list
+ end
+ end
+end
+
+desc "Run specs with mysql and sqlite3 database adapters (default)"
+task :spec => ["spec:sqlite3", "spec:mysql"]
+
desc "Default task is to run specs"
task :default => :spec \ No newline at end of file