Sha256: 1bce3b2283621542a55b1bd169385bf7b2a9a02c857daa408bbeb7d9f272210a

Contents?: true

Size: 611 Bytes

Versions: 12

Compression:

Stored size: 611 Bytes

Contents

module Serverspec
  module Type
    class Service < Base
      def enabled?
        backend.check_enabled(@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, @name)
        else
          backend.check_running(@name)
        end
      end

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
serverspec-0.6.6 lib/serverspec/type/service.rb
serverspec-0.6.5 lib/serverspec/type/service.rb
serverspec-0.6.4 lib/serverspec/type/service.rb
serverspec-0.6.3 lib/serverspec/type/service.rb
serverspec-0.6.2 lib/serverspec/type/service.rb
serverspec-0.6.1 lib/serverspec/type/service.rb
serverspec-0.6.0 lib/serverspec/type/service.rb
serverspec-0.5.8 lib/serverspec/type/service.rb
serverspec-0.5.7 lib/serverspec/type/service.rb
serverspec-0.5.6 lib/serverspec/type/service.rb
serverspec-0.5.5 lib/serverspec/type/service.rb
serverspec-0.5.4 lib/serverspec/type/service.rb