spec/unit/server_spec.rb in goliath-1.0.0 vs spec/unit/server_spec.rb in goliath-1.0.1
- old
+ new
@@ -101,9 +101,21 @@
@s.should_receive(:load_config)
@s.start
end
end
+ describe 'stop' do
+ it 'logs when receives TERM signal' do
+ EM.run do
+ logger = mock('logger')
+ logger.should_receive(:info).with('Stopping server...')
+ @s.logger = logger
+ @s.start
+ @s.stop
+ end
+ end
+ end
+
context 'config parsing' do
context 'environment' do
after(:all) do
# Be sure to revert to correct env
Goliath.env = :test