test/more/test_beep.rb in rib-1.5.4 vs test/more/test_beep.rb in rib-1.6.0
- old
+ new
@@ -7,24 +7,27 @@
before do
Rib::Beep.enable
end
- after do
- expect(Rib::Beep).disabled?
- end
-
def verify delay, threshold=nil, &block
- new_shell(:started_at => Time.now - delay,
- :beep_threshold => threshold, &block)
+ shell(:started_at => Time.now - delay,
+ :beep_threshold => threshold, &block)
+
+ stub_output
+ mock(shell).get_input{}
+
+ shell.loop
+
+ ok
end
- def expect_beep shell
- mock(shell).print("\a"){}
+ def expect_beep sh
+ mock(sh).print("\a"){}
end
- def unexpect_beep shell
- stub(shell).print.with_any_args{ flunk }
+ def unexpect_beep sh
+ stub(sh).print.with_any_args{ flunk }
end
describe 'beep' do
would 'beep if loading too long' do
verify(10, &method(:expect_beep))