Rakefile in watir-webdriver-0.8.0 vs Rakefile in watir-webdriver-0.9.0
- old
+ new
@@ -119,5 +119,26 @@
end
load "spec/watirspec/watirspec.rake" if File.exist?("spec/watirspec/watirspec.rake")
task default: [:spec, 'yard:doctest']
+
+namespace :spec do
+ require 'selenium-webdriver'
+
+ desc 'Run specs in all browsers'
+ task all_browsers: [:firefox,
+ :firefox_nightly,
+ :chrome,
+ (:safari if Selenium::WebDriver::Platform.os == :macosx),
+ (:ie if Selenium::WebDriver::Platform.os == :windows),
+ (:edge if Selenium::WebDriver::Platform.os == :windows),
+ :phantomjs].compact
+
+ %w(firefox firefox_nightly chrome safari phantomjs ie edge).each do |browser|
+ desc "Run specs in #{browser}"
+ task browser do
+ ENV['WATIR_WEBDRIVER_BROWSER'] = browser
+ Rake::Task['spec'].execute
+ end
+ end
+end