Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Trying to get the tests working in 1.9...

  • Loading branch information...
commit df0baecf410de1ef28a36ad66d76532f4fdceb87 1 parent 9c608f9
@carlhoerberg carlhoerberg authored
Showing with 10 additions and 12 deletions.
  1. +10 −12 test/spec_rack_mailexceptions.rb
View
22 test/spec_rack_mailexceptions.rb
@@ -2,10 +2,8 @@
require 'rack/mock'
begin
- require 'tmail'
- require 'rack/contrib/mailexceptions'
-
- require File.dirname(__FILE__) + '/mail_settings.rb'
+ require './lib/rack/contrib/mailexceptions'
+ require './test/mail_settings.rb'
class TestError < RuntimeError
end
@@ -57,13 +55,13 @@ def test_exception
mail.smtp @smtp_settings
end
- tmail = mailer.send(:generate_mail, test_exception, @env)
- tmail.to.should.equal ['foo@example.org']
- tmail.from.should.equal ['bar@example.org']
- tmail.subject.should.equal '[ERROR] Suffering Succotash!'
- tmail.body.should.not.be.nil
- tmail.body.should.be =~ /FOO:\s+"BAR"/
- tmail.body.should.be =~ /^\s*THE BODY\s*$/
+ mail = mailer.send(:generate_mail, test_exception, @env)
+ mail.to.should.equal ['foo@example.org']
+ mail.from.should.equal ['bar@example.org']
+ mail.subject.should.equal '[ERROR] Suffering Succotash!'
+ mail.body.should.not.be.nil
+ mail.body.should.be =~ /FOO:\s+"BAR"/
+ mail.body.should.be =~ /^\s*THE BODY\s*$/
end
specify 'catches exceptions raised from app, sends mail, and re-raises' do
@@ -167,5 +165,5 @@ def self.tls; @@_tls; end
end
end
rescue LoadError => boom
- STDERR.puts "WARN: Skipping Rack::MailExceptions tests (tmail not installed)"
+ STDERR.puts "WARN: Skipping Rack::MailExceptions tests (mail not installed)"
end
Please sign in to comment.
Something went wrong with that request. Please try again.