ruby on rails - Stub set later on perform_later ActiveJob -
i'm trying stub out activejob method in rspec cannot fiddle out. i'm having email send class mailchimp mailinglistunsubscribejob. call is:
mailinglistunsubscribejob.set(wait: 20.days).perform_later(subject: user, list: "activation") usually in rspec when not having set(wait: 20.days) have perform_later following in specs:
allow(mailinglistunsubscribejob).to receive(:perform_later) but not work. idea?
since using rspec already, can use rpec-activejob.
it has matchers need:
if job uses
set(wait_until: time), can use.to_run_at(time)chain afterenqueue_acall well.
Comments
Post a Comment