forked from brynary/arel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding spec:mysql and spec:sqlite3 tasks
- Loading branch information
Showing
29 changed files
with
1,101 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
coverage/* | ||
config/database.yml | ||
spec/fixtures/*database* | ||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.