Hello people,
I am testing the emailers. I am following this tutorial:-
http://izumi.plan99.net/manuals/testing_rails_applications-c17d65ba.html
But i have got a problem. I have written the test case as like:-
def test_check_abc
@expected = ''MyMailer#signup''
@expected.body = read_fixture(''signup'')
@expected.date = Time.now
assert_equal @expected.encoded,
Emailer.create_invite(''me-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org'',
''friend-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org'',
@expected.date).encoded
end
Now i am getting problem as
"NoMethodError: undefined method `leaverequest'' for
Emailer:Class"..
What is it ..?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 22, 7:28 am, Hemant Bhargava <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello people, > > I am testing the emailers. I am following this tutorial:-http://izumi.plan99.net/manuals/testing_rails_applications-c17d65ba.html >There''s a more update version of that at http://guides.rubyonrails.org/testing.html#testing-your-mailers> But i have got a problem. I have written the test case as like:- > > def test_check_abc > @expected = ''MyMailer#signup'' > @expected.body = read_fixture(''signup'') > @expected.date = Time.now > > assert_equal @expected.encoded, > Emailer.create_invite(''...@example.com'', ''fri...-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org'', > @expected.date).encoded > end > > Now i am getting problem as > "NoMethodError: undefined method `leaverequest'' for Emailer:Class".. > What is it ..?Probably an error in your Emailer class Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>> >> Now i am getting problem as >> "NoMethodError: undefined method `leaverequest'' for Emailer:Class".. >> What is it ..? > > Probably an error in your Emailer class >Hi Fred, The thing was that we have to use deliver_ with the method name. So i used and it delivers.. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.