Sha256: 585c0a3e704990695cdcceda82ec4b3bd4338d0930450bd41e781e61a4a04516
Contents?: true
Size: 370 Bytes
Versions: 6
Compression:
Stored size: 370 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe TTY::Shell::Question, '#read_char' do let(:input) { StringIO.new } let(:output) { StringIO.new } let(:shell) { TTY::Shell.new(input, output) } it 'reads single character' do input << "abcde" input.rewind q = shell.ask("What is your favourite letter?") expect(q.read_char).to eql "a" end end
Version data entries
6 entries across 6 versions & 1 rubygems