Quick and dirty way to test the end of a delayed::job
Then /^if he waits until the job ends$/ do
while Delayed::Job.count > 0 do
sleep 2
end
end
You can of course test more things but the idea is there!
Tell me how you do it!
I'd love how to enhance this one
Written by Yannick Schutz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tdd
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#