Sha256: 31afe4f9970c0a5a427747c913539da3fc9af113bd7d630023e986a427a68e94
Contents?: true
Size: 662 Bytes
Versions: 2
Compression:
Stored size: 662 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe DaemonKit::Safety do end describe DaemonKit::ErrorHandlers::Mail do it "should send an email report" do conf = Object.new conf.stubs(:daemon_name).returns('test') DaemonKit.stubs(:configuration).returns(conf) fake_smtp = Object.new fake_smtp.expects(:start).with('localhost.localdomain', nil, nil, nil) Net::SMTP.expects(:new).with('localhost', 25).returns(fake_smtp) begin raise RuntimeError, "specs don't fail :)" rescue => e handler = DaemonKit::ErrorHandlers::Mail.instance handler.handle_exception( e ) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bunnicula-0.2.2 | vendor/daemon-kit/spec/error_handlers_spec.rb |
bunnicula-0.2.1 | vendor/daemon_kit/daemon-kit/spec/error_handlers_spec.rb |