mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-11 00:09:38 +08:00
when running specs on the device, redirect puts/print calls to NSLog
This commit is contained in:
committed by
Watson
parent
3af8d1ce2d
commit
896da4f7fd
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user