Sha256: ea516d42af114bfa54871fbf01488b9a7e054f15ff6b1adfb962d97eb290de9d

Contents?: true

Size: 631 Bytes

Versions: 14

Compression:

Stored size: 631 Bytes

Contents

module Serverspec
  module Type
    class Service < Base
      def enabled?
        backend.check_enabled(nil, @name)
      end

      def running? under
        if under
          check_method = "check_running_under_#{under}".to_sym

          unless backend.respond_to?(check_method)
            raise ArgumentError.new("`be_running` matcher doesn't support #{@under}")
          end

          backend.send(check_method, nil, @name)
        else
          backend.check_running(nil, @name)
        end
      end

      def has_property?(property)
        backend.check_svcprops(nil, @name, property)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
serverspec-0.5.3 lib/serverspec/type/service.rb
serverspec-0.5.2 lib/serverspec/type/service.rb
serverspec-0.5.1 lib/serverspec/type/service.rb
serverspec-0.5.0 lib/serverspec/type/service.rb
serverspec-0.4.14 lib/serverspec/type/service.rb
serverspec-0.4.13 lib/serverspec/type/service.rb
serverspec-0.4.12 lib/serverspec/type/service.rb
serverspec-0.4.11 lib/serverspec/type/service.rb
serverspec-0.4.10 lib/serverspec/type/service.rb
serverspec-0.4.9 lib/serverspec/type/service.rb
serverspec-0.4.8 lib/serverspec/type/service.rb
serverspec-0.4.7 lib/serverspec/type/service.rb
serverspec-0.4.6 lib/serverspec/type/service.rb
serverspec-0.4.5 lib/serverspec/type/service.rb