Skip to content

Commit

Permalink
Add GitLeft::KeyParser specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccallebs committed May 27, 2016
1 parent 422d1f7 commit 1bdd46a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/lib/key_parser_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1bdd46a

Please sign in to comment.