Sha256: 8cfcd467a1f7168ae0d5e6d23b44d5a75c52e48757dc0c75214f9c6062815571

Contents?: true

Size: 448 Bytes

Versions: 8

Compression:

Stored size: 448 Bytes

Contents

# encoding: utf-8

require_relative 'prompt'

module TTY
  # Used for initializing test cases
  class TestPrompt < Prompt
    def initialize(options = {})
      @input  = StringIO.new
      @output = StringIO.new
      options.merge!({
        input: @input,
        output: @output,
        env: { "TTY_TEST" => true },
        enable_color: options.fetch(:enable_color) { true }
      })
      super(options)
    end
  end # TestPrompt
end # TTY

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
tty-prompt-0.15.0 lib/tty/test_prompt.rb
tty-prompt-0.14.0 lib/tty/test_prompt.rb
tty-prompt-0.13.2 lib/tty/test_prompt.rb
tty-prompt-0.13.1 lib/tty/test_prompt.rb
tty-prompt-0.13.0 lib/tty/test_prompt.rb
austb-tty-prompt-0.13.0 lib/tty/test_prompt.rb
tty-prompt-0.12.0 lib/tty/test_prompt.rb
tty-prompt-0.11.0 lib/tty/test_prompt.rb