Add name to authors list and add explicit subject in have_sent_email_spec

This commit is contained in:
Stafford Brunk 2011-06-10 12:30:00 -04:00
parent 6c222479a5
commit 3c787adc51
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Tammer Saleh", "Joe Ferris", "Ryan McGeary", "Dan Croak",
"Matt Jankowski"]
"Matt Jankowski", "Stafford Brunk"]
s.date = Time.now.strftime("%Y-%m-%d")
s.email = %q{support@thoughtbot.com}
s.extra_rdoc_files = ["README.rdoc", "CONTRIBUTION_GUIDELINES.rdoc"]

View File

@ -1,6 +1,8 @@
require 'spec_helper'
describe Shoulda::Matchers::ActionMailer::HaveSentEmailMatcher do
subject { Shoulda::Matchers::ActionMailer::HaveSentEmailMatcher.new(self) }
def add_mail_to_deliveries(params = nil)
::ActionMailer::Base.deliveries << Mailer.the_email(params)
end
@ -30,7 +32,7 @@ describe Shoulda::Matchers::ActionMailer::HaveSentEmailMatcher do
end
it "should send an e-mail based on recipient" do
should have_sent_email.to{ @info[:to] }
should have_sent_email.to(nil) { @info[:to] }
end
it "should send an e-mail based on sender" do