File: rakefile

package info (click to toggle)
ruby-gitlab-fog-azure-rm 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 756 kB
  • sloc: ruby: 5,926; sh: 9; makefile: 4
file content (33 lines) | stat: -rw-r--r-- 1,482 bytes parent folder | download | duplicates (2)
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
require 'rake/testtask'
require 'bundler/gem_tasks'

task default: :cc_coverage
task :test do
  ENV['COVERAGE'] = nil
  ENV['CODECLIMATE_REPO_TOKEN'] = nil
  Dir.glob('test/test_*.rb').each { |file| require File.expand_path file, __dir__ }
  Dir.glob('test/models/**/test_*.rb').each { |file| require File.expand_path file, __dir__ }
  Dir.glob('test/requests/**/test_*.rb').each { |file| require File.expand_path file, __dir__ }
end

task :integration do
  Dir.glob('test/integration/*.rb').each { |file| require File.expand_path file, __dir__ }
end

desc 'Generates a coverage report for minitest-cases using simple-cov'
task :coverage do
  ENV['CODECLIMATE_REPO_TOKEN'] = nil
  ENV['COVERAGE'] = 'true'
  Dir.glob('test/test_*.rb').each { |file| require File.expand_path file, __dir__ }
  Dir.glob('test/models/**/test_*.rb').each { |file| require File.expand_path file, __dir__ }
  Dir.glob('test/requests/**/test_*.rb').each { |file| require File.expand_path file, __dir__ }
end

desc 'Generates a coverage report for minitest-cases using code-climate'
task :cc_coverage do
  ENV['COVERAGE'] = nil
  ENV['CODECLIMATE_REPO_TOKEN'] = 'b1401494baa004d90402414cb33a7fc6420fd3693e60c677a120ddefd7d84cfd'
  Dir.glob('test/test_*.rb').each { |file| require File.expand_path file, __dir__ }
  Dir.glob('test/models/**/test_*.rb').each { |file| require File.expand_path file, __dir__ }
  Dir.glob('test/requests/**/test_*.rb').each { |file| require File.expand_path file, __dir__ }
end