class Spring::Commands::TestUnit

Public Instance Methods

call() click to toggle source
# File lib/spring/commands/testunit.rb, line 8
def call
  $LOAD_PATH.unshift "test"
  ARGV << "test" if ARGV.empty?
  ARGV.each do |arg|
    break if arg.start_with?("-")
    require_test(File.expand_path(arg))
  end
end
description() click to toggle source
# File lib/spring/commands/testunit.rb, line 25
def description
  "Execute a Test::Unit test."
end
env(*) click to toggle source
# File lib/spring/commands/testunit.rb, line 4
def env(*)
  "test"
end
fallback() click to toggle source
# File lib/spring/commands/testunit.rb, line 29
def fallback
  %{exec "bundle", "exec", "ruby", "-Itest", *ARGV}
end
require_test(path) click to toggle source
# File lib/spring/commands/testunit.rb, line 17
def require_test(path)
  if File.directory?(path)
    Dir[File.join path, "**", "*_test.rb"].each { |f| require f }
  else
    require path
  end
end