This is much cleaner than the method I used to achieve the same effect in `FakeReadline` (see: https://github.com/thoughtbot/gitsh/blob/master/spec/support/fake_readline.rb#L7), nice work.