Module: Sauce::TestBase

Defined in:
lib/sauce/test_base.rb

Instance Method Summary collapse

Instance Method Details

#test_each(platforms, description) ⇒ Object

Run a block with every platform



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/sauce/test_base.rb', line 5

def test_each(platforms, description)
  platforms.each do |platform|
    capabilities = {
      :os => platform[0],
      :browser => platform[1],
      :browser_version => platform[2],
      :job_name => description
    }

    capabilities.merge! platform[3] if platform[3]
    selenium = Sauce::Selenium2.new(capabilities)

    yield selenium, capabilities
  end
end