diff --git a/spec/lib/key_parser_spec.rb b/spec/lib/key_parser_spec.rb new file mode 100644 index 0000000..1a9d751 --- /dev/null +++ b/spec/lib/key_parser_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +describe GitLeft::KeyParser do + describe '#action' do + subject { described_class.new(input).action } + + context 'with h input' do + let(:input) { 'h' } + + it { is_expected.to eq(:delete) } + end + + context 'with l input' do + let(:input) { 'l' } + + it { is_expected.to eq(:skip) } + end + + context 'with anything else' do + let(:input) { 'o' } + + it { is_expected.to eq(:quit) } + end + end +end