diff --git a/tests/test.d/simple_test.rb b/tests/test.d/simple_test.rb index d2b7f0b1f..59090682d 100644 --- a/tests/test.d/simple_test.rb +++ b/tests/test.d/simple_test.rb @@ -76,7 +76,7 @@ class SimpleTest end def clean_tmp - File.unlink(@tmp) if File.exists?(@tmp) && (ENV["KEEP_TMPFILES"] != "1") + File.unlink(@tmp) if @tmp && File.exists?(@tmp) && !ENV["KEEP_TMPFILES"].nil? && (ENV["KEEP_TMPFILES"] != "1") @tmp = nil end