when running specs on the device, redirect puts/print calls to NSLog

This commit is contained in:
Laurent Sansonetti
2014-10-15 16:16:19 +02:00
committed by Watson
parent 3af8d1ce2d
commit 896da4f7fd

View File

@@ -726,3 +726,14 @@ end
# Do not log all exceptions when running the specs.
Exception.log_exceptions = false
unless UIDevice.currentDevice.model.match(/simulator/i)
module Kernel
def puts(*args)
NSLog(args.join("\n"))
end
def print(*args)
puts *args # TODO
end
end
end