spec/spec_helper.rb in watir-webdriver-0.0.6 vs spec/spec_helper.rb in watir-webdriver-0.0.7
- old
+ new
@@ -12,8 +12,15 @@
if defined?(WatirSpec)
browser = (ENV['WATIR_WEBDRIVER_BROWSER'] || :firefox).to_sym
- WatirSpec.browser_args = [browser]
- WatirSpec.implementation = :webdriver
+ WatirSpec.implementation do |imp|
+ imp.name = :webdriver
+ imp.browser_class = Watir::Browser
+ imp.browser_args = [browser]
+
+ imp.guard_proc = lambda { |args|
+ args.any? { |arg| arg == :webdriver || arg == [:webdriver, browser] }
+ }
+ end
end