Class: Praegustator::TestSuite

Inherits:
Object
  • Object
show all
Defined in:
lib/praegustator/test_suite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query) ⇒ TestSuite

Returns a new instance of TestSuite.



6
7
8
9
10
11
# File 'lib/praegustator/test_suite.rb', line 6

def initialize(query)
  @query = query
  @checks = {}
  @params = {}
  @nodes = Praegustator::Wrappers::Chef.search query
end

Instance Attribute Details

#checksObject

Returns the value of attribute checks.



4
5
6
# File 'lib/praegustator/test_suite.rb', line 4

def checks
  @checks
end

#nodesObject

Returns the value of attribute nodes.



4
5
6
# File 'lib/praegustator/test_suite.rb', line 4

def nodes
  @nodes
end

#paramsObject

Returns the value of attribute params.



4
5
6
# File 'lib/praegustator/test_suite.rb', line 4

def params
  @params
end

Instance Method Details

#check(name) ⇒ Object



13
14
15
# File 'lib/praegustator/test_suite.rb', line 13

def check(name)
  @checks[name] = {}
end

#executeObject



21
22
23
24
25
# File 'lib/praegustator/test_suite.rb', line 21

def execute
  # lazy load
  require 'praegustator/wrappers/server_spec'
  Praegustator::Wrappers::ServerSpec.new.execute self
end

#properties(params) ⇒ Object



17
18
19
# File 'lib/praegustator/test_suite.rb', line 17

def properties(params)
    @params = params
end