lib/turn/command.rb in turn-0.9.2 vs lib/turn/command.rb in turn-0.9.3
- old
+ new
@@ -1,7 +1,6 @@
require 'optparse'
-require 'turn'
module Turn
# Turn - Pretty Unit Test Runner for Ruby
#
@@ -205,14 +204,17 @@
opts.separator " "
opts.separator "COMMAND OPTIONS"
opts.on('--debug', "turn debug mode on") do
- $VERBOSE = true
$DEBUG = true
end
+ opts.on('--warn', "turn warnings on") do
+ $VERBOSE = true
+ end
+
opts.on_tail('--version', "display version") do
puts VERSION
exit
end
@@ -250,12 +252,12 @@
controller = Turn::Controller.new(config)
result = controller.start
if result
- exit result.passed?
+ exit (result.passed? ? 0 : -1)
else # no tests
- exit
+ exit -1
end
end
end