Sha256: d88a61b7298ae67cb0a8dbf7303a01aaadb3453217f6ff90826205c92083c9dd
Contents?: true
Size: 489 Bytes
Versions: 6
Compression:
Stored size: 489 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe TTY::Shell::Question, '#read_date' do let(:input) { StringIO.new } let(:output) { StringIO.new } let(:shell) { TTY::Shell.new(input, output) } it 'reads date' do input << "20th April 1887" input.rewind q = shell.ask("When were your born?") answer = q.read_date expect(answer).to be_kind_of Date expect(answer.day).to eql 20 expect(answer.month).to eql 4 expect(answer.year).to eql 1887 end end
Version data entries
6 entries across 6 versions & 1 rubygems