forked from tomykaira/rspec-parameterized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
30 lines (27 loc) · 751 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
29
30
#!/usr/bin/env rake
require "bundler/gem_tasks"
task :default => [:spec]
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rspec_opts = ['-c -f d']
end
end
namespace :spec do
%w(rspec2 rspec3.3 rspec3.4).each do |gemfile|
desc "Run Tests by #{gemfile}.gemfile"
task gemfile do
Bundler.with_clean_env do
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle install --path .bundle"
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake -t spec"
end
end
end
desc "Run All Tests"
task :all do
%w(rspec2 rspec3.3 rspec3.4).each do |gemfile|
Rake::Task["spec:#{gemfile}"].invoke
end
end
end