Class: Spring::Commands::TestUnit
- Inherits:
-
Object
- Object
- Spring::Commands::TestUnit
- Defined in:
- lib/spring/commands/testunit.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 15 |
# 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.(arg)) end end |
#description ⇒ Object
25 26 27 |
# File 'lib/spring/commands/testunit.rb', line 25 def description "Execute a Test::Unit test." end |
#env ⇒ Object
4 5 6 |
# File 'lib/spring/commands/testunit.rb', line 4 def env(*) "test" end |
#require_test(path) ⇒ Object
17 18 19 20 21 22 23 |
# 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 |