From 06ce663886c56b96ef25b31f0463e2207f7321fd Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 18 Feb 2025 15:34:35 +0200 Subject: add support to delete a file --- test/lib/dslkeywords/file_test.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/lib/dslkeywords/file_test.rb b/test/lib/dslkeywords/file_test.rb index 60b659e..d8bbc49 100644 --- a/test/lib/dslkeywords/file_test.rb +++ b/test/lib/dslkeywords/file_test.rb @@ -24,6 +24,23 @@ class RCMFileTest < Minitest::Test assert_equal arr.join("\n"), File.read(FILE_PATH) end + def test_file_absent + configure_from_scratch do + file :create_file do + path FILE_PATH + is :present + :text + end + + file :delete_file do + path FILE_PATH + is :absent + end + end + + refute File.file?(FILE_PATH) + end + def test_create_file_from_sourcefile text = 'Hello World!' source_path = "#{FILE_PATH}.source.rcmtmp" -- cgit v1.2.3