From 2655c119e43b4f8aa89a0f0b97fa62af1fefb1fd Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 23 May 2017 16:47:00 -0400 Subject: [PATCH] add spec for Environment#find_finished_thread to fully cover --- spec/rscons/environment_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/rscons/environment_spec.rb b/spec/rscons/environment_spec.rb index 96a36f9..a11dde1 100644 --- a/spec/rscons/environment_spec.rb +++ b/spec/rscons/environment_spec.rb @@ -326,6 +326,13 @@ module Rscons end end + describe "#find_finished_thread" do + it "raises an error if called with nonblock=false and no threads to wait for" do + env = Environment.new + expect {env.__send__(:find_finished_thread, [], false)}.to raise_error /No threads to wait for/ + end + end + describe ".parse_makefile_deps" do it 'handles dependencies on one line' do expect(File).to receive(:read).with('makefile').and_return(<