Forum: Ruby on Rails Sending email in functional test times out

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2006-02-28 01:27
(Received via mailing list)
I'm writing a functional test to see if an email was generated from a
particular action.  The action of course sends an email at some
point..but the test says it times out.
config.action_mailer.delivery_method is set to :test in
config/environments/test.rb, not sure why it would be ignoring that.
If I take out my email config from environment.rb, the test runs fine.
 Here's the exception:

Loaded suite test/functional/contact_controller_test
Started
./usr/local/lib/ruby/1.8/timeout.rb:54:in `new': execution expired
(Timeout::Error)
        from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
        from /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'
        from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
        from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
        from /usr/local/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
        from /usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start'
        from /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start'
        from
/usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.1.5/lib/action_mailer/base.rb:436:in
`perform_delivery_smtp'
         ... 24 levels...
        from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:200:in
`run'
        from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run'
        from /usr/local/lib/ruby/1.8/test/unit.rb:285
        from test/functional/contact_controller_test.rb:22
This topic is locked and can not be replied to.