---
title: "Discussion on \"How to Mock ActionMailer\" | Hashnode"
description: "Discussion on \"How to Mock ActionMailer\". Using RSpec custom matchers to make clean ActionMailer mocks"
url: "https://hashnode.com/posts/how-to-mock-actionmailer/627e7ab255afbae29a622bd2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Mock ActionMailer](https://blog.nolanphillips.com/how-to-mock-actionmailer?utm_source=hashnode&utm_medium=feed)

Using RSpec custom matchers to make clean ActionMailer mocks

May 13, 2022 · 2 min read · blog.nolanphillips.com  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#testing](https://hashnode.com/tag/testing)
-   [#bdd](https://hashnode.com/tag/bdd)

## Written by

[Nolan Phillips](https://hashnode.com/@nolanphillips)

@nolanphillips

  
[View profile](https://hashnode.com/@nolanphillips)

## Responses 1

Markdown supported · ⌘↵ to post

[Sérgio Martins](https://hashnode.com/@sergiomartins8)

[May 14, 2022](https://hashnode.com/posts/how-to-mock-actionmailer/627e7ab255afbae29a622bd2/comment/627fa968bc9305ec393630d9)

This is great. Exactly what I've been looking for.

Totally agree with "_it's extremely awkward to mock for tests [blog.nolanphillips.com/how-to-mock-actionmailer](https://blog.nolanphillips.com/how-to-mock-actionmailer)_".

Concise walkthrough, appreciate it 👏
