Sha256: c937e929cb70f3842bcf2818d761d783cceaf5a7ac26fe9be46f4ea12393a3cf

Contents?: true

Size: 269 Bytes

Versions: 25

Compression:

Stored size: 269 Bytes

Contents

RSpec::Matchers.define :run_under_account do |account_name|
  match do |service|
    Backend::PowerShell::Command.new do
      exec "(Get-WmiObject win32_service | where-object { $_.Name -eq '#{service.name}' }).StartName -eq '#{account_name}"
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
octopus-serverspec-extensions-0.13.2 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.13.1 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.13.0 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.12.2 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.12.1 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.12.0 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.8 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.7 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.6 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.5 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.4 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.2 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.1 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.11.0 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.10.2 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.10.1 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.10.0 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.9.0 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.8.1 lib/octopus_serverspec_extensions/matcher/run_under_account.rb
octopus-serverspec-extensions-0.8.0 lib/octopus_serverspec_extensions/matcher/run_under_account.rb