I generated mailer with command from documentation:
% hanami generate mailer welcome
Then I changed mailer a little and improved test. I didn’t change files location.
Result is here: https://gist.github.com/sugarfree1/e148c134f4870db3bcfc7c4099e2be4b
Now I want to put mailer in new namespace.
New mailer is here: https://gist.github.com/sugarfree1/0f2f4d054e7ce83468daa71ed722f5f9
Test fails with error:
Failure/Error: expect(mail.body.encoded).to include('hello, world')
expected "" to include "hello, world"
So, changing default namespace in mailer leads to empty mail body. I looked deeper a little and found out that this happens because no templates found in
template_name returns weird result.
Any help on how to use namespaces is highly appreciated.