support/doctest_helper.rb in watir-6.0.0.beta5 vs support/doctest_helper.rb in watir-6.0.0
- old
+ new
@@ -1,7 +1,7 @@
require 'watir'
-require 'spec/watirspec/lib/watirspec'
+require 'watirspec'
#
# 1. If example does not start browser, start new one, reuse until example
# finishes and close after.
# 2. If example starts browser and assigns it to local variable `browser`,
@@ -60,9 +60,13 @@
%w[Watir::HasWindow Watir::Window#== Watir::Window#use].each do |name|
doctest.before(name) do
browser.goto WatirSpec.url_for('window_switching.html')
browser.a(id: 'open').click
end
+ end
+
+ doctest.before do
+ WatirSpec.run!
end
doctest.after do
browser.quit
@browser = nil