Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

split spec runner tasks into rake spec (framework-agnostic), spec:rai…

…ls, spec:datamapper and spec:sequel
  • Loading branch information...
commit e8cea1ba74b51d0dd3268aa0e5612a643cc406e9 1 parent c0a37ed
@mislav mislav authored
Showing with 27 additions and 1 deletion.
  1. +27 −1 spec/tasks.rake
View
28 spec/tasks.rake
@@ -2,13 +2,39 @@ require 'spec/rake/spectask'
spec_opts = 'spec/spec.opts'
-desc 'Run all specs'
+desc 'Run framework-agnostic specs'
Spec::Rake::SpecTask.new(:spec) do |t|
t.libs << 'lib' << 'spec'
t.spec_opts = ['--options', spec_opts]
+ t.spec_files = FileList.new('spec/**/*_spec.rb') do |files|
+ files.exclude(/\b(active_record|active_resource|action_view|data_mapper|sequel)_/)
+ end
end
namespace :spec do
+ desc 'Run specs for core, ActiveRecord and ActionView'
+ Spec::Rake::SpecTask.new(:rails) do |t|
+ t.libs << 'lib' << 'spec'
+ t.spec_opts = ['--options', spec_opts]
+ t.spec_files = FileList.new('spec/**/*_spec.rb') do |files|
+ files.exclude(/\b(data_mapper|sequel)_/)
+ end
+ end
+
+ desc 'Run specs for DataMapper'
+ Spec::Rake::SpecTask.new(:datamapper) do |t|
+ t.libs << 'lib' << 'spec'
+ t.spec_opts = ['--options', spec_opts]
+ t.spec_files = FileList.new('spec/finders_spec.rb', 'spec/finders/data_mapper_spec.rb')
+ end
+
+ desc 'Run specs for Sequel'
+ Spec::Rake::SpecTask.new(:sequel) do |t|
+ t.libs << 'lib' << 'spec'
+ t.spec_opts = ['--options', spec_opts]
+ t.spec_files = FileList.new('spec/finders_spec.rb', 'spec/finders/sequel_spec.rb')
+ end
+
desc 'Analyze spec coverage with RCov'
Spec::Rake::SpecTask.new(:rcov) do |t|
t.libs << 'lib' << 'spec'
Please sign in to comment.
Something went wrong with that request. Please try again.