Class: Sauce::TestGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/sauce/parallel/test_group.rb

Instance Method Summary collapse

Constructor Details

#initialize(platforms) ⇒ TestGroup



3
4
5
6
# File 'lib/sauce/parallel/test_group.rb', line 3

def initialize(platforms)
  @platforms = platforms
  @index = 0
end

Instance Method Details

#next_platformObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/sauce/parallel/test_group.rb', line 8

def next_platform
  platform = @platforms[@index]
  @index += 1
  begin
    caps ={
      'os' => platform[0],
      'browser' => platform[1],
      'version' => platform[2]
    }
    caps.merge!({:caps => platform[3]}) if platform[3]
    caps
  rescue NoMethodError => e
    puts "I don't have any config"
  end
end