forked from ebeigarts/auto_html
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
35 lines (31 loc) · 861 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
require 'rake/testtask'
desc 'Default: run tests'
task :default => :test
desc 'Test AutoHtml'
Rake::TestTask.new(:test) do |t|
t.pattern = 'test/**/*_test.rb'
end
desc 'Test with recent versions of Rails'
task :test_wit_all_rails_versions do
versions = ['2.1.2',
'2.2.3',
# '2.3.14',
'3.0.11',
'3.1.3',
'3.2.1']
versions.each do |v|
puts "\n###### TESTING WITH RAILS #{v}"
ENV['RAILS_VERSION'] = v
Rake::Task['test'].execute
end
end
desc 'Test with versions of Rails available on the system'
task :test_with_installed do
versions = `gem list rails | grep rails`.gsub("rails (", "").chop.split(', ')
exclude = []
(versions-exclude).each do |v|
puts "\n###### TESTING WITH RAILS #{v}"
ENV['RAILS_VERSION'] = v
Rake::Task['test'].execute
end
end