Sha256: 6b333fc972db45be56ef8be06e910f113584b9800cf739ebfd7c0f62f61b224c
Contents?: true
Size: 1.07 KB
Versions: 8
Compression:
Stored size: 1.07 KB
Contents
require 'rspec' require 'capybara/rspec' require 'testingbot' require 'testingbot/capybara' browsers = [{ :browserName => "firefox", :version => 9, :platform => "WINDOWS" }, { :browserName => "firefox", :version => 10, :platform => "WINDOWS" }] browsers.each do |browser| shared_examples "an example test on #{browser[:browserName]} #{browser[:version]}" do |actions| describe "Demo", :type => :request do before :all do TestingBot::config do |config| config[:desired_capabilities] = browser end Capybara.run_server = false Capybara.current_driver = :testingbot Capybara.app_host = "http://testingbot.com" end after :all do TestingBot.reset_config! Capybara.current_driver = :testingbot page.driver.browser.quit page.driver.instance_variable_set(:@browser, nil) end it 'has a homepage with the word Selenium' do visit '/' page.should have_content('Selenium') end end end describe "Sample", :type => :request do it_behaves_like "an example test on #{browser[:browserName]} #{browser[:version]}" end end
Version data entries
8 entries across 8 versions & 1 rubygems