Class: TTYGuard
Overview
If a spec depends on STDOUT being a tty, use this guard. For specs that may block if run as a background process, see BackgroundGuard.
Instance Method Summary collapse
Methods inherited from SpecGuard
#===, #after, #before, finish, #implementation?, #initialize, #os?, #platform?, register, ruby_version, #standard?, unregister, #unregister, #windows?, windows?, #wordsize?, #yield?
Constructor Details
This class inherits a constructor from SpecGuard
Instance Method Details
#match? ⇒ Boolean
7 8 9 |
# File 'lib/mspec/guards/tty.rb', line 7 def match? STDOUT.tty? end |