Skip to content

Instantly share code, notes, and snippets.

@marzzz21
Created September 13, 2016 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marzzz21/32cceb0f8a6b6d77c1aed39e05f99bf4 to your computer and use it in GitHub Desktop.
Save marzzz21/32cceb0f8a6b6d77c1aed39e05f99bf4 to your computer and use it in GitHub Desktop.
it 'creates a WorkerPool with a size based on the defined worker count' do
allow(mirrorsyncdaemon).to receive(:get_worker_count) { 5 }
worker_pool = double()
allow(WorkerPool).to receive(:new) { worker_pool }
allow(workerpool).to receive(:shutdown) {}
expect(mirrorsyncdaemon).to receive(:get_worker_count)
expect(WorkerPool).to receive(:new).with(5)
mirrorsyncdaemon.init_workers
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment