diff --git a/spec/truffle/launcher_spec.rb b/spec/truffle/launcher_spec.rb index a76e6340af2..e3697277f4a 100644 --- a/spec/truffle/launcher_spec.rb +++ b/spec/truffle/launcher_spec.rb @@ -80,7 +80,7 @@ def check_status_or_print(stdout_and_stderr) it "all launchers are in @launchers" do known = @launchers.keys.map(&:to_s).sort - actual = Dir.children(File.dirname(RbConfig.ruby)).sort + actual = Dir.children(@bindir).sort actual.delete('truffleruby-polyglot-get') actual.should == known end @@ -145,6 +145,12 @@ def check_status_or_print(stdout_and_stderr) `#{@bindir}/gem uninstall hello-world -x #{@redirect}` check_status_and_empty_stderr File.should_not.exist?(@bindir + '/hello-world.rb') + + # remove a shim file + shim_file_path = @bindir + '/hello-world.rb.lock' + if File.exist?(shim_file_path) + File.unlink(shim_file_path) + end end end