summaryrefslogtreecommitdiff
path: root/test/lib/dslkeywords/file_test.rb
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-01 18:38:49 +0200
committerPaul Buetow <paul@buetow.org>2026-03-01 18:38:49 +0200
commit08129b43792eeec92eacb9f47ce3f879489aa03c (patch)
treef527ba7c71c58536fa68b0acaef41dcd56a3cfc6 /test/lib/dslkeywords/file_test.rb
parent861e526d9ad9228f2b740dbcf00cf39d8fe652f2 (diff)
make rcm usable as a gem from any directory, fix bugs and tests
- Add lib/rcm.rb entry point and bin/rcm CLI executable - Update gemspec: v0.1.0, proper files list, executables, runtime deps - Support standalone arg parsing and --hosts filtering in options - Fix inverted logic and typo in FileBackup#different? (== vs !=, cecksum_b) - Fix unqualified File.directory? resolving to RCM::File in Directory - Fix test_chown assertions running before evaluate! creates files - Add setup to file tests to prevent order-dependent failures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'test/lib/dslkeywords/file_test.rb')
-rw-r--r--test/lib/dslkeywords/file_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lib/dslkeywords/file_test.rb b/test/lib/dslkeywords/file_test.rb
index 35a0f21..a290627 100644
--- a/test/lib/dslkeywords/file_test.rb
+++ b/test/lib/dslkeywords/file_test.rb
@@ -12,6 +12,12 @@ class RCMFileTest < Minitest::Test
FileUtils.rm_r(DIR_PATH) if File.directory?(DIR_PATH)
end
+ # Clean up shared temp file between tests to prevent order-dependent failures
+ def setup
+ File.unlink(FILE_PATH) if File.file?(FILE_PATH)
+ FileUtils.rm_r(DIR_PATH) if File.directory?(DIR_PATH)
+ end
+
def test_create_file_from_string
text = 'Hello World!'
configure_from_scratch do