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


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

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

Instance Attribute Details

#excludesArray (readonly)

Returns Array of names of excluded platforms.

Returns:

  • (Array)

    Array of names of excluded platforms


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

def excludes
  @excludes
end

#includesArray (readonly)

Returns Array of names of only included platforms.

Returns:

  • (Array)

    Array of names of only included platforms


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

def includes
  @includes
end

#nameString (readonly)

Returns logical name of this suite.

Returns:

  • (String)

    logical name of this suite


25
26
27
# File 'lib/kitchen/suite.rb', line 25

def name
  @name
end