Skip to content

Commit ce31d80

Browse files
committed
Improve "idempotency" for nuke option
1 parent 27e7d2e commit ce31d80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/sass_spec/test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ def run_spec_test(test_case, options = {})
1515
f.write(status)
1616
f.close
1717
end
18+
elsif (File.file?(test_case.status_path))
19+
File.unlink(test_case.status_path)
1820
end
1921

2022
if error.length > 0
2123
File.open(test_case.error_path, "w+") do |f|
2224
f.write(error)
2325
f.close
2426
end
27+
elsif (File.file?(test_case.error_path))
28+
File.unlink(test_case.error_path)
2529
end
2630

2731
File.open(test_case.expected_path, "w+") do |f|

0 commit comments

Comments
 (0)