spec/tty/shell/question/validation/valid_value_spec.rb in tty-0.0.11 vs spec/tty/shell/question/validation/valid_value_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::Validation, '#valid_value?' do
let(:validation) { /^[^\.]+\.[^\.]+/ }
@@ -9,16 +9,16 @@
subject { instance.valid_value?(value) }
context '' do
let(:value) { nil }
- it { should be_false }
+ it { is_expected.to eq(false) }
end
context 'when the value matches validation' do
let(:value) { 'piotr.murach' }
- it { should be_nil }
+ it { is_expected.to eq(true) }
end
context 'when the value is not matching validation' do
let(:value) { 'piotrmurach' }