Class: RightScaleSelfService::Test::Suite

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client, glob) ⇒ Suite

Returns a new instance of Suite.



26
27
28
29
30
31
32
33
# File 'lib/rightscale_selfservice/test/suite.rb', line 26

def initialize(api_client, glob)
  self.templates = []
  self.api_client = api_client
  template_files = Dir.glob(glob)
  template_files.each do |template|
    templates << RightScaleSelfService::Test::Template.new(template)
  end
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



23
24
25
# File 'lib/rightscale_selfservice/test/suite.rb', line 23

def api_client
  @api_client
end

#templatesObject

Returns the value of attribute templates.



24
25
26
# File 'lib/rightscale_selfservice/test/suite.rb', line 24

def templates
  @templates
end

Instance Method Details

#pumpObject



35
36
37
38
39
40
41
# File 'lib/rightscale_selfservice/test/suite.rb', line 35

def pump
  finished_templates = templates.select do |t|
    t.pump(self)
    t.state == 'finished'
  end
  templates.length != finished_templates.length
end