diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dslkeywords/file.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dslkeywords/file.rb b/lib/dslkeywords/file.rb index 020a97f..41b8cd7 100644 --- a/lib/dslkeywords/file.rb +++ b/lib/dslkeywords/file.rb @@ -56,6 +56,11 @@ module RCM return unless super return evaluate_ensure_line! unless @ensure_line.nil? + if @is == :absent + ::File.delete(@file_path) if ::File.exist?(@file_path) + return + end + write!(real_content) end |
