Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / specinfra_stubs.rb
1 # class Specinfra::Command::Windows::Base::File
2 class Specinfra::Command::Windows::Base::File < Specinfra::Command::Windows::Base
3   class << self
4     def check_is_owned_by(file, owner)
5       Backend::PowerShell::Command.new do
6         exec "if((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}'
7           -or ((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}').Length -gt 0){ exit 0 } else { exit 1 }"
8       end
9     end
10   end
11 end
12 # class Specinfra::Command::Base::File
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