spec/shrimple/process_monitor_spec.rb in shrimple-0.8.0 vs spec/shrimple/process_monitor_spec.rb in shrimple-0.8.2
- old
+ new
@@ -64,6 +64,14 @@
it "handles waiting for zero processes" do
expect {
child = Shrimple.processes.wait_next
}.to raise_exception(ThreadsWait::ErrNoWaitingThread)
end
+
+ it "can find a process" do
+ processes = Shrimple::ProcessMonitor.new(-1)
+ object = Object.new
+ processes._add(object)
+ result = processes.find { |o| o == object }
+ expect(result).to eq object
+ end
end