11155
(-- --)
#1
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@example.com', 'friend@example.com',
@expected.date).encoded
end
Now i am getting problem as
"NoMethodError: undefined method `leaverequest' for Emailer:Class"..
What is it ..?
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...@example.com',
@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
11155
(-- --)
#3
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..