blob: a78b325aad8d1b2e1b855163349ff384d507bb31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
require 'minitest/autorun'
require 'fileutils'
require_relative '../../../lib/dsl'
class RCMTouchTest < Minitest::Test
FILE_PATH = './.touch_test.rcmtmp'.freeze
Minitest.after_run do
File.unlink(FILE_PATH) if File.file?(FILE_PATH)
end
def test_touch_file
configure_from_scratch do
touch FILE_PATH
end
assert File.file?(FILE_PATH)
assert File.size(FILE_PATH).zero?
end
def test_touch_update_file
configure_from_scratch do
touch create do
path FILE_PATH
end
touch update do
path FILE_PATH
is updated
requires touch create
end
end
assert File.file?(FILE_PATH)
assert File.size(FILE_PATH).zero?
end
end
|