Sha256: c04da3391bc093d98e18fb92250daffab8ddcba2fe0fa4853f3b94d3d2071c9f

Contents?: true

Size: 838 Bytes

Versions: 2

Compression:

Stored size: 838 Bytes

Contents

#!/usr/local/bin/ruby -ws

$v    ||= false
$h    ||= false
$help ||= false

if $h or $help then
  help = [
          "autotest [options]",
          nil,
          "options:",
          "\t-h",
          "\t-help\t\tYou're looking at it.",
          nil,
          "\t-v\t\tBe verbose.",
          "\t\t\tPrints files that autotest doesn't know how to map to",
          "\t\t\ttests.",
         ]
  STDERR.puts help.join("\n")
  exit 1
end

$rspec   ||= false
$rails   ||= false
$camping ||= false

style = []
style << "rspec" if $rspec or File.directory?('spec')
style << "rails" if $rails or File.exist? 'config/environment.rb'
style << "camping" if $camping or File.exist? 'test/camping_test_case.rb'
style << "autotest"

mod = style.join("_")
puts "loading #{mod}"
require mod
Object.const_get(style.map {|s| s.capitalize}.join).run

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ZenTest-3.5.1 bin/autotest
ZenTest-3.5.2 bin/autotest