Hi Gleb

What are you unable to test about them? ParameterizedMailers should act as 
normal Mailers under test (as we don’t test how they’re created, only the 
result) and you can see a basic “MailerSpec” here 
https://relishapp.com/rspec/rspec-rails/v/3-8/docs/mailer-specs.

We do also have Job specs, 
https://relishapp.com/rspec/rspec-rails/v/3-8/docs/job-specs/job-spec, and 
coming soon (unreleased but you could use by pointing rspec-rails at GitHub) 
we’ll have specific helpers for asserting mailer jobs are queued (e.g. 
have_enqueued)

Is that of any help?

Jon Rowe
---------------------------
[email protected]
jonrowe.co.uk

On 12 February 2019 at 15:13, [email protected] wrote:
> Hello,
>
> Parameterized Mailers 
> (https://api.rubyonrails.org/v5.1/classes/ActionMailer/Parameterized.html) 
> were added in Rails 5.1. I would like to use them in my project, but I have 
> not being able to write tests for them using RSpec.
> Minitest provides the test helper method assert_enqueued_email_with 
> (documented here 
> (https://api.rubyonrails.org/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with)).
>  Is there an equivalent in RSpec?
>
> Thanks,
> Gleb
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/dejalu-217-995f74f2-a898-4b03-9de3-00a84b15a910%40jonrowe.co.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to