       assert_email_delivered_with(text_body: ~r/love/) # Will pass
       assert_email_delivered_with(text_body: ~r/like/) # Will fail
   """
-  defmacro assert_email_delivered_with(email_params, opts \\ []) do
-    quote bind_quoted: [email_params: email_params, opts: opts] do
-      import ExUnit.Assertions
-      timeout = Bamboo.Test.get_timeout(opts)
-      assert_receive({:delivered_email, email}, timeout, Bamboo.Test.flunk_no_emails_received())
-
-      received_email_params = email |> Map.from_struct()
-
-      assert Enum.all?(email_params, fn {k, v} -> do_match(received_email_params[k], v, k) end),
-             Bamboo.Test.flunk_attributes_do_not_match(email_params, received_email_params)
-    end
+  def assert_email_delivered_with(email_params, opts \\ []) do
+    timeout = get_timeout(opts)
+    assert_receive({:delivered_email, email}, timeout, flunk_no_emails_received())
+
+    received_email_params = email |> Map.from_struct()
+
+    assert Enum.all?(email_params, fn {k, v} -> do_match(received_email_params[k], v, k) end),
+           flunk_attributes_do_not_match(email_params, received_email_params)
   end
 
   @doc """

    end
  end

  @doc false
  def flunk_no_emails_received do
    flunk("""
    There were 0 emails delivered to this process.


    """
  end

  defp flunk_attributes_match(params_given, params_received) do
    """
    The parameters given match.

