lib/rgot/m.rb in rgot-0.0.3 vs lib/rgot/m.rb in rgot-0.0.4
- old
+ new
@@ -11,22 +11,22 @@
end
def run
test_ok = false
example_ok = false
+
Timeout.timeout(@opts[:timeout].to_f) {
test_ok = run_tests
example_ok = run_examples
}
if !test_ok || !example_ok
puts "FAIL"
- 1
- else
- puts "PASS"
- 0
+ return 1
end
+ puts "PASS" if @opts[:verbose]
run_benchmarks
+ 0
end
private
def run_tests
@@ -84,11 +84,9 @@
puts e.output.strip
end
end
ok
end
-
- private
def capture
orig_out, orig_err = $stdout, $stderr
out, err = StringIO.new, StringIO.new
$stdout, $stderr = out, err