spec/tty/shell/question/valid_spec.rb in tty-0.0.11 vs spec/tty/shell/question/valid_spec.rb in tty-0.1.0
- old
+ new
@@ -1,6 +1,6 @@
-# -*- encoding: utf-8 -*-
+# encoding: utf-8
require 'spec_helper'
describe TTY::Shell::Question, '#valid' do
let(:input) { StringIO.new }
@@ -11,18 +11,18 @@
it 'reads valid optios with helper' do
input << 'club'
input.rewind
q = shell.ask("What is your card suit sir?").valid(cards)
- expect(q.read_choice).to eql 'club'
+ expect(q.read_choice).to eq('club')
end
it 'reads valid options with option hash' do
input << 'club'
input.rewind
q = shell.ask("What is your card suit sir?", :valid => cards)
- expect(q.read_choice).to eql 'club'
+ expect(q.read_choice).to eq('club')
end
it 'reads invalid option' do
input << 'clover'
input.rewind
@@ -39,8 +39,8 @@
it 'reads with default' do
input << ''
input.rewind
q = shell.ask("What is your card suit sir?").valid(cards).default('club')
- expect(q.read_choice).to eql 'club'
+ expect(q.read_choice).to eq('club')
end
end