File: Rakefile

package info (click to toggle)
ruby-otr-activerecord 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: ruby: 561; sh: 133; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'bundler/setup'
require 'minitest/test_task'

Bundler::GemHelper.install_tasks

# Accepts files, dirs, N=test_name_or/pattern/, X=test_name_or/pattern/
Minitest::TestTask.create(:test) do |t|
  globs = ARGV[1..].map { |a|
    if Dir.exist? a
      "#{a}/**/*_test.rb"
    elsif File.exist? a
      a
    end
  }.compact

  t.libs << "test" << "lib"
  t.test_globs = globs.any? ? globs : ["test/**/*_test.rb"]
end