File: Rakefile

package info (click to toggle)
ruby-default-value-for 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 144 kB
  • ctags: 97
  • sloc: ruby: 450; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 543 bytes parent folder | download
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
task :default => :test

desc "Run unit tests."
task :test do
  ruby "test.rb"
end

['3.2', '4.0', '4.1', '4.2'].each do |version|
  dotless = version.delete('.')

  namespace :bundle do
    desc "Bundle with Rails #{version}.x"
    task :"rails#{dotless}" do
      ENV['BUNDLE_GEMFILE'] = "Gemfile.rails.#{version}.rb"
      sh "bundle"
    end
  end

  namespace :test do
    desc "Test with Rails #{version}.x"
    task :"rails#{dotless}" do
      ENV['BUNDLE_GEMFILE'] = "Gemfile.rails.#{version}.rb"
      ruby "test.rb"
    end
  end
end