Re: [rspec-users] rails3/rspec2: how to write mailer tests?

2010-09-02 Thread nathanvda
> > Start with "script/rails generate rspec:mailer sms" - that will generate a > stub for you and you can go from there. I am sorry if that was not clear, but i am using rspec2 and rails. I did use "rails g mailer SomethingMailer" and that produced an empty test. But when i did "rails g mailer S

Re: [rspec-users] rails3/rspec2: how to write mailer tests?

2010-09-02 Thread Justin Ko
On Sep 2, 11:24 am, Toni Tuominen wrote: > On Thu, Sep 2, 2010 at 6:16 PM, nathanvda wrote: > > This will sound awfully stupid, but i have no idea how to start > > writing any mailer tests. > > > I have a mailer class > > >    class SmsMailer < ActionMailer::Base > > >      def fake_sms(envelop

Re: [rspec-users] rails3/rspec2: how to write mailer tests?

2010-09-02 Thread Toni Tuominen
On Thu, Sep 2, 2010 at 6:16 PM, nathanvda wrote: > This will sound awfully stupid, but i have no idea how to start > writing any mailer tests. > > I have a mailer class > >    class SmsMailer < ActionMailer::Base > >      def fake_sms(envelope) >        mail(:to => envelope.user.email) >      end

Re: [rspec-users] rails3/rspec2: how to write mailer tests?

2010-09-02 Thread David Chelimsky
On Sep 2, 2010, at 10:16 AM, nathanvda wrote: > This will sound awfully stupid, but i have no idea how to start > writing any mailer tests. > > I have a mailer class > > class SmsMailer < ActionMailer::Base > > def fake_sms(envelope) > mail(:to => envelope.user.email) > end >

Re: [rspec-users] rails3/rspec2: how to write mailer tests?

2010-09-02 Thread David Chelimsky
On Sep 2, 2010, at 10:16 AM, nathanvda wrote: > This will sound awfully stupid, but i have no idea how to start > writing any mailer tests. > > I have a mailer class > >class SmsMailer < ActionMailer::Base > > def fake_sms(envelope) >mail(:to => envelope.user.email) > end

[rspec-users] rails3/rspec2: how to write mailer tests?

2010-09-02 Thread nathanvda
This will sound awfully stupid, but i have no idea how to start writing any mailer tests. I have a mailer class class SmsMailer < ActionMailer::Base def fake_sms(envelope) mail(:to => envelope.user.email) end end how do I test this? I tried googling for documentation