Joined November 2016
·
Posted to
Testing concurrency with rspec, the easy way
over 1 year
ago
Thanks for the post, super helpful. Can you tell me how the make_concurrent_calls
method would look if the passed in method required arguments? For instance:
make_concurrent_calls(@user, :update(params), {})
For anyone interested here is my implementation for methods that need arguments passed. I also used ruby keyword arguments, hard coded the number of concurrent processes, removed the options hash and added an ActiveRecord object check so it supports non ActiveRecord objects.