问题描述
仅在评估with
块之后,如何评估expect
自变量?
let(:job) { create(:job) }
it do
expect { job }
.to have_enqueued_mail(NotificationMailer,:note)
.with(
user: job.user
)
end
在其他情况下,将在expect
块之外创建作业,并且通知发送on: create
,因此不会在expect
块中发生期望。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)