@@ -68,6 +68,7 @@ Feature: have_enqueued_mail matcher
6868 When I run `rspec spec/mailers/my_mailer_spec.rb`
6969 Then the examples should all pass
7070
71+ @rails_post_6
7172 Scenario : Parameterize the mailer
7273 Given a file named "app/mailers/my_mailer.rb" with:
7374 """ruby
@@ -90,13 +91,14 @@ Feature: have_enqueued_mail matcher
9091 # Works with named parameters
9192 expect {
9293 MyMailer.with(foo: 'bar').signup.deliver_later
93- }.to have_enqueued_mail(MyMailer, :signup).with(foo: 'bar')
94+ }.to have_enqueued_mail(MyMailer, :signup).with(a_hash_including(params: { foo: 'bar'}) )
9495 end
9596 end
9697 """
9798 When I run `rspec spec/mailers/my_mailer_spec.rb`
9899 Then the examples should all pass
99100
101+ @rails_post_6
100102 Scenario : Parameterize and pass an argument to the mailer
101103 Given a file named "app/mailers/my_mailer.rb" with:
102104 """ruby
@@ -120,7 +122,7 @@ Feature: have_enqueued_mail matcher
120122 # Works also with both, named parameters match first argument
121123 expect {
122124 MyMailer.with(foo: 'bar').signup('user').deliver_later
123- }.to have_enqueued_mail(MyMailer, :signup).with({foo: 'bar'}, 'user')
125+ }.to have_enqueued_mail(MyMailer, :signup).with(params: {foo: 'bar'}, args: [ 'user'] )
124126 end
125127 end
126128 """
0 commit comments