Accept mode as argument in `file_write' action
This commit is contained in:
@@ -21,3 +21,10 @@ end
|
||||
Then /^the remote file "([^"]+)" must contain exactly "([^"]+)"$/ do |path, content|
|
||||
check_exact_file_content path, content
|
||||
end
|
||||
|
||||
Then /^the remote file "([^"]+)" must have (\d+) mode$/ do |path, mode|
|
||||
in_current_dir do
|
||||
puts path, ('%o' % [File::Stat.new(path).mode])[-4, 4], mode
|
||||
expect(('%o' % [File::Stat.new(path).mode])[-4, 4]).to match mode
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user