Sha256: 474e0e3a0d268f59484a2da4dc3729564b1a2bf3be3986d9ab81fa83246fca62
Contents?: true
Size: 704 Bytes
Versions: 5
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true require "stringio" require_relative "../prompt" module TTY # Used for initializing test cases class Prompt module StringIOExtensions def wait_readable(*) true end def ioctl(*) 80 end end class Test < TTY::Prompt def initialize(**options) @input = StringIO.new @input.extend(StringIOExtensions) @output = StringIO.new options.merge!({ input: @input, output: @output, env: { "TTY_TEST" => true }, enable_color: options.fetch(:enable_color) { true } }) super(**options) end end # Test end # Prompt end # TTY
Version data entries
5 entries across 5 versions & 2 rubygems