-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
28 lines (23 loc) · 898 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require "bundler/gem_tasks"
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end
task :default => "spec:all"
namespace :spec do
%w(active_record_42 active_record_41 active_record_40 active_record_32 mongoid_4 mongoid_3).each do |gemfile|
desc "Run Tests against #{gemfile}"
task gemfile do
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rspec"
end
end
desc "Run Tests against active_record versions"
task :all do
%w(active_record_42 active_record_41 active_record_40 active_record_32 mongoid_4 mongoid_3).each do |gemfile|
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rspec"
end
end
end