]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/concat/spec/acceptance/specinfra_stubs.rb
upgrade to concat 2.0.0
[dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / specinfra_stubs.rb
1 class Specinfra::Command::Windows::Base::File < Specinfra::Command::Windows::Base
2   class << self
3     def check_is_owned_by(file, owner)
4       Backend::PowerShell::Command.new do
5         exec "if((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}'
6           -or ((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}').Length -gt 0){ exit 0 } else { exit 1 }"
7       end
8     end
9   end
10 end
11
12
13 class Specinfra::Command::Base::File < Specinfra::Command::Base
14   class << self
15     def get_content(file)
16       "cat '#{file}' 2> /dev/null || echo -n"
17     end
18   end
19 end