Thomas Hall Jr.


12,620 Experience
126 Lessons Completed
0 Questions Solved


Posted in How to test ActionMailer in Rails Discussion

Great episode, Chris. I like how you said you don't really need to test CSS styling but instead focus on testing the higher level functionality of your mailers. That way, a developer doesn't go down a rabbit hole writing too fine grained tests.

Also, the last point about ActionMailer::Base.deliveries makes me wonder what the difference is between that and assert_emails.

Hey Felipe,

Yeah, I think I know what you mean. querySelectorAll returns an object but since you can do something like object[0] to get the first element in the object, it looks like you might be working with an array. Great point.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.