Sha256: 120038d8efa9e252b27e425597398383d463849e910fd340f1542271c5a11cce
Contents?: true
Size: 680 Bytes
Versions: 5
Compression:
Stored size: 680 Bytes
Contents
require 'rib/test' require 'rib/core/last_value' describe Rib::LastValue do paste :rib before do stub_output stub(Rib).shell{shell} end test_for Rib::LastValue do would 'set last_value' do mock(shell).get_input{'Rib.last_value'} mock(shell).get_input{'10**2'} mock(shell).get_input{'Rib.last_value'} expect(shell.loop_once).eq [nil, nil] shell.loop_once expect(shell.loop_once).eq [100, nil] end would 'set last_exception' do mock(shell).get_input{'XD'} mock(shell).get_input{'Rib.last_exception'} shell.loop_once expect(shell.loop_once.first).kind_of?(NameError) end end end
Version data entries
5 entries across 5 versions & 1 rubygems