Module: TestBench::Controls::Output::Device

Defined in:
lib/test_bench/controls/output.rb

Class Method Summary collapse

Class Method Details

.non_ttyObject



32
33
34
# File 'lib/test_bench/controls/output.rb', line 32

def self.non_tty
  Tempfile.new 'non-tty-control'
end

.ttyObject



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/test_bench/controls/output.rb', line 18

def self.tty
  file = non_tty

  def file.tty?
    true
  end

  def file.isatty
    true
  end

  file
end