spec/unit/daemon/signal_handler_spec.rb in rpush-2.2.0-java vs spec/unit/daemon/signal_handler_spec.rb in rpush-2.3.0.rc1
- old
+ new
@@ -42,10 +42,11 @@
describe 'HUP' do
before do
Rpush::Daemon::Synchronizer.stub(:sync)
Rpush::Daemon::Feeder.stub(:wakeup)
+ Rpush::Daemon.stub(store: double(reopen_log: nil))
end
it 'syncs' do
with_handler_start_stop do
Rpush::Daemon::Synchronizer.should_receive(:sync)
@@ -71,10 +72,13 @@
end
describe 'error handing' do
let(:error) { StandardError.new('test') }
- before { Rpush.stub(logger: double(error: nil, info: nil)) }
+ before do
+ Rpush.stub(logger: double(error: nil, info: nil, reopen: nil))
+ Rpush::Daemon.stub(store: double(reopen_log: nil))
+ end
it 'logs errors received when handling a signal' do
Rpush::Daemon::Synchronizer.stub(:sync).and_raise(error)
expect(Rpush.logger).to receive(:error).with(error)
with_handler_start_stop do