test/test_shell.rb in rib-1.0.0 vs test/test_shell.rb in rib-1.0.1
- old
+ new
@@ -14,12 +14,14 @@
def input str
mock(@shell).get_input{str}
@shell.loop
true.should.eq true
end
- should 'exit' do input('exit') end
- should 'quit' do input('quit') end
- should 'ctrl+d' do mock(@shell).puts; input(nil) end
+ should 'exit' do input('exit' ) end
+ should 'also exit' do input(' exit') end
+ should 'ctrl+d' do mock(@shell).puts ; input(nil) end
+ should ':q' do @shell.config[:exit] << ':q'; input(':q') end
+ should '\q' do @shell.config[:exit] << '\q'; input('\q') end
end
describe '#loop_once' do
def input str=nil
if block_given?