[rspec-users] Rails 3 Mailer spec with arguments ?

Peter Fitzgibbons peter.fitzgibbons at gmail.com
Fri Jun 11 14:22:50 EDT 2010

  This came out of the mailer generator w/ Rspec-rails installed :

describe Notifier do
   it "should deliver activation instructions message" do
     @expected.subject = "Activation instructions"
     @expected.to      = "to at example.org"
     @expected.from    = "from at example.com"
     @expected.body    = read_fixture("activation_instructions")

Could someone tell me how to modify this spec so that an argument can be 
sent into Notifier#activation_instructions ?

class Notfier < ActionMailer::Base
     def activation_instructions(user)
         # ... mail :to => ...


Peter Fitzgibbons
(847) 859-9550
peter.fitzgibbons at gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100611/9d85478b/attachment.html>

More information about the rspec-users mailing list