Sha256: c3238a7397c5c5ab4251b952e0ea0061c8f33f70837a89aa6106b5f3baf14bf5
Contents?: true
Size: 645 Bytes
Versions: 11
Compression:
Stored size: 645 Bytes
Contents
# encoding: utf-8 RSpec.describe TTY::Prompt::Question, 'ask multiline' do it 'reads multiple lines with :read option' do prompt = TTY::TestPrompt.new prompt.input << "First line\nSecond line\nThird line" prompt.input.rewind answer = prompt.ask("Provide description?", read: :multiline) expect(answer).to eq(['First line', 'Second line', 'Third line']) end it 'reads multiple lines with method' do prompt = TTY::TestPrompt.new prompt.input << "First\nSecond\nThird" prompt.input.rewind answer = prompt.multiline("Provide description?") expect(answer).to eq(['First', 'Second', 'Third']) end end
Version data entries
11 entries across 11 versions & 1 rubygems