File: test

package info (click to toggle)
ruby-crack 0.4.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 2,716 kB
  • sloc: ruby: 859; sh: 39; makefile: 3
file content (25 lines) | stat: -rwxr-xr-x 541 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
#/ Usage: test [individual test file]
#/
#/ Bootstrap and run all tests or an individual test.
#/
#/ Examples:
#/
#/   # run all tests
#/   test
#/
#/   # run individual test
#/   test test/controller_instrumentation_test.rb
#/

set -e
cd $(dirname "$0")/..

[ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && {
    grep '^#/' <"$0"| cut -c4-
    exit 0
}

script/bootstrap && ruby -I lib -I test -r rubygems \
  -e 'require "bundler/setup"' \
  -e '(ARGV.empty? ? Dir["test/**/*_test.rb"] : ARGV).each { |f| load f }' -- "$@"