From 69067b64942fad72bd0ec9eeab7f161ef4a16ee3 Mon Sep 17 00:00:00 2001 From: elijah Date: Sun, 30 Nov 2014 22:19:20 -0800 Subject: minor: ensure there is only one tapicero process --- tests/helpers/os_helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/helpers/os_helper.rb') diff --git a/tests/helpers/os_helper.rb b/tests/helpers/os_helper.rb index 529e899f..aad67dda 100644 --- a/tests/helpers/os_helper.rb +++ b/tests/helpers/os_helper.rb @@ -17,8 +17,12 @@ class LeapTest }.compact end - def assert_running(process) - assert pgrep(process).any?, "No running process for #{process}" + def assert_running(process, options={}) + processes = pgrep(process) + assert processes.any?, "No running process for #{process}" + if options[:single] + assert processes.length == 1, "More than one process for #{process}" + end end # -- cgit v1.2.3