Sha256: 58dee0bc948482144f3929605d6e2ea393b1ddb842f8481c0de9a30040f7d067

Contents?: true

Size: 666 Bytes

Versions: 6

Compression:

Stored size: 666 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe TTY::Shell::Question, '#initialize' do
  let(:input)  { StringIO.new }
  let(:output) { StringIO.new }
  let(:shell) { TTY::Shell.new(input, output) }
  let(:message) { 'Do you like me?' }

  subject(:question) { described_class.new shell }

  it { expect(question.required?).to eq(false) }

  it { expect(question.echo).to eq(true) }

  it { expect(question.mask).to eq(false) }

  it { expect(question.character).to eq(false) }

  it { expect(question.modifier).to be_kind_of(TTY::Shell::Question::Modifier) }

  it { expect(question.validation).to be_kind_of(TTY::Shell::Question::Validation) }
end # initialize

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tty-0.2.1 spec/tty/shell/question/initialize_spec.rb
tty-0.2.0 spec/tty/shell/question/initialize_spec.rb
tty-0.1.3 spec/tty/shell/question/initialize_spec.rb
tty-0.1.2 spec/tty/shell/question/initialize_spec.rb
tty-0.1.1 spec/tty/shell/question/initialize_spec.rb
tty-0.1.0 spec/tty/shell/question/initialize_spec.rb