forked from FooBarWidget/default_value_for
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
50 lines (44 loc) · 891 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
50
task :default => :test
desc "Run unit tests."
task :test do
ruby "test.rb"
end
rails_versions = %w(
3.2
4.0
4.1
4.2
5.0
5.1
5.2
6.0
6.1
7.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
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
rails_versions.each do |version|
dotless = version.delete('.')
ENV['BUNDLE_GEMFILE'] = "gemfiles/rails_#{dotless}.gemfile"
ruby "test.rb"
end
end
end