spec/spec_helper.rb in xml-sitemap-1.2.2 vs spec/spec_helper.rb in xml-sitemap-1.3.0
- old
+ new
@@ -27,5 +27,15 @@
contents = gz.read
gz.close
end
contents
end
+
+module FileHelper
+ def delete_if_exists(path)
+ File.delete(path) if File.exists?(path)
+ end
+end
+
+class File
+ extend FileHelper
+end
\ No newline at end of file