-
Notifications
You must be signed in to change notification settings - Fork 128
/
Rakefile
49 lines (42 loc) · 946 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
task :default => :test
require "bundler/gem_tasks"
desc "Run unit tests."
task :test do
ruby "test.rb"
end
rails_versions = %w(
6.1
7.0
7.1
7.2
8.0
)
rails_versions.each do |version|
dotless = version.delete('.')
namespace :bundle do
desc "Bundle with Rails #{version}.x"
task :"rails#{dotless}" do
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
sh "bundle"
end
end
namespace :test do
desc "Test with Rails #{version}.x"
task :"rails#{dotless}" do
sh 'appraisal install'
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
ruby "test.rb"
end
end
end
namespace :test do
desc "Test with all supported Rails versions"
task :railsall do
sh 'appraisal install'
rails_versions.each do |version|
dotless = version.delete('.')
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
ruby "test.rb"
end
end
end