Sha256: f269186ab60bcddeca41bf88f10392f1c9493986499d3094464152c8a6708b1f
Contents?: true
Size: 379 Bytes
Versions: 5
Compression:
Stored size: 379 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
5 entries across 5 versions & 1 rubygems