Sha256: 1296ec3a303cd21f34fc092056f27a9dcd5faa3ee626cc9b277768133e3b3b24

Contents?: true

Size: 431 Bytes

Versions: 10

Compression:

Stored size: 431 Bytes

Contents

# encoding: utf-8

RSpec.describe TTY::Prompt, '#new' do
  it "sets prefix" do
    prompt = described_class.new(prefix: "[?]")
    expect(prompt.prefix).to eq("[?]")
  end

  it "sets input stream" do
    prompt = described_class.new(input: :stream1)
    expect(prompt.input).to eq(:stream1)
  end

  it "sets output stream" do
    prompt = described_class.new(output: :stream2)
    expect(prompt.output).to eq(:stream2)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tty-prompt-0.10.1 spec/unit/new_spec.rb
tty-prompt-0.10.0 spec/unit/new_spec.rb
tty-prompt-0.9.0 spec/unit/new_spec.rb
tty-prompt-0.8.0 spec/unit/new_spec.rb
tty-prompt-0.7.1 spec/unit/new_spec.rb
tty-prompt-0.7.0 spec/unit/new_spec.rb
tty-prompt-0.6.0 spec/unit/new_spec.rb
tty-prompt-0.5.0 spec/unit/new_spec.rb
tty-prompt-0.4.0 spec/unit/new_spec.rb
tty-prompt-0.3.0 spec/unit/new_spec.rb