Class: Kitchen::Suite

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/suite.rb

Overview

A logical configuration representing a test case or fixture that will be executed on a platform.

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Suite

Constructs a new suite.

Parameters:

  • options (Hash) (defaults to: {})

    configuration for a new suite

Options Hash (options):

  • :name (String)

    logical name of this suit (Required)

  • :excludes (String)

    Array of names of excluded platforms

  • :includes (String)

    Array of names of only included platforms



42
43
44
45
46
47
48
# File 'lib/kitchen/suite.rb', line 42

def initialize(options = {})
  @name = options.fetch(:name) do
    raise ClientError, "Suite#new requires option :name"
  end
  @excludes = PlatformFilter.convert(options.fetch(:excludes, []))
  @includes = PlatformFilter.convert(options.fetch(:includes, []))
end

Instance Attribute Details

#excludesArray (readonly)

Returns Array of names of excluded platforms.

Returns:

  • (Array)

    Array of names of excluded platforms



30
31
32
# File 'lib/kitchen/suite.rb', line 30

def excludes
  @excludes
end

#includesArray (readonly)

Returns Array of names of only included platforms.

Returns:

  • (Array)

    Array of names of only included platforms



33
34
35
# File 'lib/kitchen/suite.rb', line 33

def includes
  @includes
end

#nameString (readonly)

Returns logical name of this suite.

Returns:

  • (String)

    logical name of this suite



27
28
29
# File 'lib/kitchen/suite.rb', line 27

def name
  @name
end